Package simtools.shapes

Examples of simtools.shapes.AxisShape$AxePropertiesNames


       
        // Rectangle
        rectangle = new RectangleShape(ox, oy, width, height);  
       
        // Axis
        axis = new AxisShape(false,true,_ox,_oy ,width, height);
        axis.setWithGridlines(true);
        axis.setWithAxis(false);    // do not display axis line
        validity = false;
        auto = true;
 
View Full Code Here


    public boolean doAction(double x, double y, Object o, String action, CompoundEdit undoableEdit) {
        if (action==null) return false;

        if (action.equals("mouseOver")) {
            if (_magnetizedCurve!=null){
                AxisShape axe_x = _magnetizedCurve.secondaryXaxis? _asx2 : _asx1;
                double pos_x = axe_x.getMin() + (x - _ox) / axe_x.getScale();
                try{
                    _magnetizedCurve.shape.setCurrentPoint(pos_x);

                    //  Display red circle on magnetized point coordinates : 
                    notifyChange(getBounds());
View Full Code Here

     * @param axe The <b>AxisShape</b>
     * @param x1 A mouse position in plot hsape.
     * @return computed axis coordinate
     */
    public Double getAxeValue(int axeIndex, int x){
        AxisShape axe=null;
        switch (axeIndex){
        case Plot.PX: axe = _asx1; break;
        case Plot.SX: axe = _asx2; break;
        case Plot.PY: axe = _asy1; break;
        case Plot.SY: axe = _asy2; break;
        }
        Double ret=null;
        if (axe!=null){

            if (axe!=null){
                double anchor = axe.isVertical()? _oy : _ox;
                double value = axe.getMin() + (x - anchor) / axe.getScale();
                if (axe.isLog()) {
                    value = Math.pow(10, Math.floor(value));
                }
                ret = new Double(value);
            }
        }
View Full Code Here

TOP

Related Classes of simtools.shapes.AxisShape$AxePropertiesNames

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.