Changeset 1102 for trunk/src/org/expeditee/gui/FrameCreator.java
- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameCreator.java
r1063 r1102 19 19 package org.expeditee.gui; 20 20 21 import java. awt.Color;22 import java.util. *;21 import java.util.LinkedList; 22 import java.util.List; 23 23 24 24 import org.expeditee.agents.ExistingFramesetException; 25 import org.expeditee.core.Colour; 25 26 import org.expeditee.items.Item; 26 27 import org.expeditee.items.Text; 27 28 28 29 public class FrameCreator { 30 29 31 public static final int INDENT_FROM_TITLE = 20; 30 32 … … 60 62 61 63 public FrameCreator(String frameTitle) { 62 this(Display IO.getCurrentFrame().getFramesetName(), DisplayIO64 this(DisplayController.getCurrentFrame().getFramesetName(), DisplayController 63 65 .getCurrentFrame().getPath(), frameTitle, false, false); 64 66 } … … 83 85 * @return the newly created button. 84 86 */ 85 public static Item createButton(String text, Float x, Float y, Floatright,86 Floatbottom) {87 public static Item createButton(String text, Integer x, Integer y, Integer right, 88 Integer bottom) { 87 89 Text button = new Text(text); 88 90 89 button.setBackgroundColor(Colo r.LIGHT_GRAY);90 button.setBorderColor(Colo r.DARK_GRAY);91 button.setBackgroundColor(Colour.LIGHT_GREY); 92 button.setBorderColor(Colour.DARK_GREY); 91 93 button.setThickness(2.0F); 92 94 if (bottom != null) … … 99 101 button.setY(y); 100 102 101 button. updatePolygon();103 button.invalidateBounds(); 102 104 103 105 return button; 104 106 } 105 107 106 public FrameCreator(String name, String path, String frameTitle, 107 boolean recreate, boolean multiColumn){108 public FrameCreator(String name, String path, String frameTitle, boolean recreate, boolean multiColumn) 109 { 108 110 _multiColumn = multiColumn; 109 _Mnext = createButton("@Next", null, null, 10 F, 15F);111 _Mnext = createButton("@Next", null, null, 10, 15); 110 112 111 113 _Mprev = createButton("@Previous", null, null, _Mnext.getBoundsWidth() 112 + _Mnext.getAnchorRight() + 20 F, 15F);114 + _Mnext.getAnchorRight() + 20, 15); 113 115 114 116 _Mfirst = createButton("@First", null, null, _Mprev.getBoundsWidth() 115 + _Mprev.getAnchorRight() + 20 F, 15F);117 + _Mprev.getAnchorRight() + 20, 15); 116 118 117 119 Frame toUse = null; … … 180 182 } 181 183 182 private void resetGlobals(Frame toUse) { 184 private void resetGlobals(Frame toUse) 185 { 183 186 Text title = toUse.getTitleItem(); 184 187 START_X = INDENT_FROM_TITLE + title.getX(); … … 217 220 // new frame 218 221 if (!_multiColumn 219 || toAdd.getBoundsWidth() + _lastX > FrameGraphics 220 .getMaxSize().width) { 222 || toAdd.getBoundsWidth() + _lastX > DisplayController.getFramePaintArea().getWidth()) { 221 223 // Make sure text items that are created on the current 222 224 // frame are removed … … 229 231 toAdd.setOffset(0, 0); 230 232 toAdd.setID(_current.getNextItemID()); 231 toAdd.setRightMargin( FrameGraphics.getMaxFrameSize().width, true);233 toAdd.setRightMargin(DisplayController.getFramePaintArea().getWidth(), true); 232 234 233 235 _current.addItem(toAdd); … … 245 247 } 246 248 247 public Text addText(String toAdd, Colo r c, String link, String action,249 public Text addText(String toAdd, Colour c, String link, String action, 248 250 boolean bSave) { 249 251 Text text = _current.createNewText(toAdd);
Note:
See TracChangeset
for help on using the changeset viewer.