@author Simon Gwerder @version OGV 3.1, May 2015
| 39 | * |
| 40 | */ |
| 41 | public class PaneBox implements Selectable { |
| 42 | |
| 43 | private final static Logger logger = LoggerFactory.getLogger(PaneBox.class); |
| 44 | |
| 45 | public final static int CLASSBOX_DEPTH = 10; |
| 46 | public final static int OBJECTBOX_DEPTH = 20; |
| 47 | public final static int INIT_DEPTH = 10; |
| 48 | |
| 49 | public final static Color DEFAULT_COLOR = Color.CORNSILK; |
| 50 | |
| 51 | public final static double MIN_WIDTH = 100.0; |
| 52 | public final static double MIN_HEIGHT = 100.0; |
| 53 | |
| 54 | public final static double MAX_WIDTH = Double.MAX_VALUE; // was at 464 before |
| 55 | public final static double MAX_HEIGHT = Double.MAX_VALUE; |
| 56 | |
| 57 | public final static double BASE_HEIGHT = 72.0; // required min height with one centerlabel (experience value) |
| 58 | public final static double TOP_LABEL_HEIGHT = 32.0; |
| 59 | public final static double CENTER_LABEL_HEIGHT = 28.0; |
| 60 | public final static double HORIZONTAL_BORDER_GAP = 7.0; |
| 61 | public final static double VERTICAL_BORDER_GAP = 5.0; |
| 62 | public final static int MAX_CENTER_LABELS = Integer.MAX_VALUE; // was at 15 before |
| 63 | |
| 64 | private Group paneBox = new Group(); |
| 65 | private BoxSelection selection = null; |
| 66 | private BorderPane borderPane = null; |
| 67 | |
| 68 | private Label topLabel = null; |
| 69 | private TextField topTextField = null; |
| 70 | |
| 71 | private ArrayList<Label> centerLabels = new ArrayList<Label>(); |
| 72 | private ArrayList<TextField> centerTextFields = new ArrayList<TextField>(); |
| 73 | |
| 74 | private volatile Label selectedLabel = null; |
| 75 | |
| 76 | private volatile int indexCenterGrid = -1; // row index of centerlabels, where grid should begin, -1: no center grid |
| 77 | |
| 78 | private Color color; |
| 79 | private Cuboid box; |
| 80 | |
| 81 | public Group get() { |
| 82 | return this.paneBox; |
| 83 | } |
| 84 | |
| 85 | public Cuboid getBox() { |
| 86 | return this.box; |
| 87 | } |
| 88 | |
| 89 | public Color getColor() { |
| 90 | return this.color; |
| 91 | } |
| 92 | |
| 93 | public void setColor(Color color) { |
| 94 | this.color = color; |
| 95 | this.borderPane.setStyle(getPaneStyle()); |
| 96 | this.box.setColor(color); |
| 97 | } |
| 98 |
nothing calls this directly
no outgoing calls
no test coverage detected