Beispiel #1
0
  public void initializeObjects() {
    xPos.setEditable(true);
    m_function.setOperation(m_initialExpression);
    m_function.setVerticesCount(500);
    m_function.setBoundarysVisible(false);
    PolygonDisplayProperties prop = new PolygonDisplayProperties();
    prop.setObjectColor(Color.blue);
    prop.setBorderColor(Color.blue);
    prop.setAntiAliasing(false);
    m_function.setDisplayProperties(prop);
    PointDisplayProperties pointProp = new PointDisplayProperties();
    pointProp.setObjectColor(Color.red);
    pointProp.setPointRadius(3);
    pointProp.setAntiAliasing(false);
    m_lower.setXY(m_initLowerBound, 0);
    m_upper.setXY(m_initUpperBound, 0);
    m_lower.setDisplayProperties(pointProp);
    m_upper.setDisplayProperties(pointProp);
    getCanvas2D().getW2STransformationHandler().setUniformWorldDim(m_initialCanvasDim);
    m_defInterval.setEditable(true);
    DisplayProperties props = m_defInterval.getDisplayProperties();
    props.setFont(new Font("Serif", Font.PLAIN, 18));
    props.setAntiAliasing(false);
    m_defInterval.setDisplayProperties(props);

    m_defInterval.setBoundary(
        m_initLowerBound, Interval.CLOSED, m_initUpperBound, Interval.OPEN, Interval.SQUARE);
  }
Beispiel #2
0
  private void createObjects() {
    m_function = new MMFunctionDefByOp(m_numberClass, m_initialExpression);
    m_function.setEditable(true);
    DisplayProperties props = m_function.getDisplayProperties();
    props.setFont(new Font("Serif", Font.PLAIN, 18));
    m_function.setDisplayProperties(props);

    Affine2DMouseTranslateHandler amth = new Affine2DMouseTranslateHandler(getCanvas2D());
    amth.setinXOnly(true);
    m_lower = new MMAffine2DPoint(m_numberClass);
    m_lower.addHandler(amth);
    m_upper = new MMAffine2DPoint(m_numberClass);
    m_upper.addHandler(amth);
    m_defInterval =
        new MMInterval(
            MMDouble.class,
            m_initLowerBound,
            Interval.CLOSED,
            m_initUpperBound,
            Interval.OPEN,
            Interval.SQUARE);
  }