public double getDividerAt( int x, int y ){ Root root = getRoot(); if( orientation == Orientation.HORIZONTAL ){ double mx = x / root.getWidthFactor(); return (mx - this.x) / width; } else{ double my = y / root.getHeightFactor(); return (my - this.y) / height; } }
/** * Gets the space that a divider needs in the width. * @return the width of a divider */ public double getDividerWidth(){ return node.getStation().getDividerSize() / node.getRoot().getWidthFactor(); }
/** * Gets the space that a divider needs in the height. * @return the height of a divider */ public double getDividerHeight(){ return node.getStation().getDividerSize() / node.getRoot().getHeightFactor(); }
/** * Gets the space that a divider needs in the width. * @return the width of a divider */ public double getDividerWidth(){ return node.getStation().getDividerSize() / node.getRoot().getWidthFactor(); }
/** * Gets the space that a divider needs in the height. * @return the height of a divider */ public double getDividerHeight(){ return node.getStation().getDividerSize() / node.getRoot().getHeightFactor(); }
bounds = new Rectangle(); Root root = getRoot(); double factorW = root.getWidthFactor(); double factorH = root.getHeightFactor();