Changeset 729
- Timestamp:
- 01/21/14 11:59:05 (10 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Frame.java
r722 r729 56 56 } 57 57 58 public static Color[] COLOR_WHEEL = { new Color(235, 235, 235),59 new Color(225, 225, 255), new Color(195, 255, 255),60 new Color(225, 255, 225), new Color(255, 255, 195),61 new Color(255, 225, 225), new Color(255, 195, 255), Color.WHITE,62 Color.GRAY, Color.DARK_GRAY, Color.BLACK, null };63 64 58 // The various attributes of this Frame 65 59 private String _frameset = null; … … 152 146 153 147 private void resetDot() { 154 _dotTemplate.setColor( Item.COLOR_WHEEL[1]);155 _dotTemplate.setFillColor( Item.FILL_COLOR_WHEEL[0]);148 _dotTemplate.setColor(UserSettings.ColorWheel.get()[1]); 149 _dotTemplate.setFillColor(UserSettings.FillColorWheel.get()[0]); 156 150 } 157 151 158 152 public void nextDot() { 159 153 _dotTemplate.setFillColor(ColorUtils.getNextColor(_dotTemplate 160 .getFillColor(), Item.FILL_COLOR_WHEEL, null));154 .getFillColor(), UserSettings.FillColorWheel.get(), null)); 161 155 _dotTemplate.setColor(ColorUtils.getNextColor(_dotTemplate.getColor(), 162 Item.COLOR_WHEEL, null));156 UserSettings.ColorWheel.get(), null)); 163 157 164 158 if (_dotTemplate.getColor() == null || _dotTemplate.getColor().equals(Color.white)) { … … 1859 1853 public void toggleBackgroundColor() { 1860 1854 setBackgroundColor(ColorUtils.getNextColor(_background, 1861 Frame.COLOR_WHEEL, null));1855 UserSettings.BackgroundColorWheel.get(), null)); 1862 1856 } 1863 1857 -
trunk/src/org/expeditee/gui/FrameKeyboardActions.java
r655 r729 1791 1791 color = null; 1792 1792 else 1793 color = ColorUtils.getNextColor(color, Item.FILL_COLOR_WHEEL, toSet1793 color = ColorUtils.getNextColor(color, UserSettings.FillColorWheel.get(), toSet 1794 1794 .getGradientColor()); 1795 1795 … … 1819 1819 color = null; 1820 1820 else 1821 color = ColorUtils.getNextColor(color, Item.COLOR_WHEEL, toSet1821 color = ColorUtils.getNextColor(color, UserSettings.ColorWheel.get(), toSet 1822 1822 .getFillColor()); 1823 1823 … … 1900 1900 color = null; 1901 1901 else if (setBackgroundColor) { 1902 color = ColorUtils.getNextColor(color, Item.FILL_COLOR_WHEEL, item1902 color = ColorUtils.getNextColor(color, UserSettings.FillColorWheel.get(), item 1903 1903 .getPaintColor()); 1904 1904 } else { 1905 color = ColorUtils.getNextColor(color, Item.COLOR_WHEEL,1905 color = ColorUtils.getNextColor(color, UserSettings.ColorWheel.get(), 1906 1906 currentFrame.getPaintBackgroundColor()); 1907 1907 } -
trunk/src/org/expeditee/gui/FrameUtils.java
r706 r729 1419 1419 help.setFontStyle("Bold"); 1420 1420 help.setFamily("SansSerif"); 1421 help.setColor( Item.COLOR_WHEEL[3]);1421 help.setColor(UserSettings.ColorWheel.get()[3]); 1422 1422 1423 1423 xPos += 25; … … 1459 1459 templates.setFontStyle("Bold"); 1460 1460 templates.setFamily("SansSerif"); 1461 templates.setColor( Item.COLOR_WHEEL[3]);1461 templates.setColor(UserSettings.ColorWheel.get()[3]); 1462 1462 1463 1463 xPos += 25; -
trunk/src/org/expeditee/items/Item.java
r720 r729 129 129 130 130 public static final Color GREEN = Color.GREEN.darker(); 131 132 /**133 * The Colors cycled through when using function keys to set the Color of134 * this Item.135 */136 public static Color[] COLOR_WHEEL = { Color.BLACK, Color.RED, Color.BLUE,137 Item.GREEN, Color.MAGENTA, Color.YELLOW.darker(), Color.WHITE };138 139 // TODO Have shift toggle through a black and white color wheel?140 public static Color[] FILL_COLOR_WHEEL = { new Color(255, 150, 150),141 new Color(150, 150, 255), new Color(150, 255, 150),142 new Color(255, 150, 255), new Color(255, 255, 100), Color.WHITE,143 Color.BLACK };144 131 145 132 public static final int UNCHANGED_CURSOR = -100; -
trunk/src/org/expeditee/items/widgets/charts/AbstractChart.java
r410 r729 27 27 import org.expeditee.items.Text; 28 28 import org.expeditee.items.widgets.DataFrameWidget; 29 import org.expeditee.settings.UserSettings; 29 30 import org.jfree.chart.ChartPanel; 30 31 import org.jfree.chart.JFreeChart; … … 109 110 Color newColor = ColorUtils.getNextColor( 110 111 getSource().getFillColor(), 111 Frame.COLOR_WHEEL, null);112 UserSettings.BackgroundColorWheel.get(), null); 112 113 setSourceFillColor(newColor); 113 114 } … … 117 118 } else { 118 119 Color newColor = ColorUtils.getNextColor( 119 getSource().getColor(), Item.COLOR_WHEEL,120 getSource().getColor(), UserSettings.ColorWheel.get(), 120 121 null); 121 122 setSourceColor(newColor); -
trunk/src/org/expeditee/settings/UserSettings.java
r717 r729 6 6 import java.io.IOException; 7 7 import java.util.ArrayList; 8 import java.util.Arrays; 8 9 import java.util.LinkedList; 9 10 import java.util.List; … … 22 23 import org.expeditee.items.ItemUtils; 23 24 import org.expeditee.items.Text; 25 import org.expeditee.setting.ArraySetting; 24 26 import org.expeditee.setting.BooleanSetting; 25 27 import org.expeditee.setting.FloatSetting; … … 289 291 * Colorwheels 290 292 */ 291 public static final FrameSetting ColorWheel = new FrameSetting("The colours of items in the child frame are used to populate the colour wheel") { 292 @Override 293 protected void run(Frame frame) { 294 Item.COLOR_WHEEL = FrameUtils.getColorWheel(frame); 295 } 296 }; 297 298 public static final FrameSetting FillColorWheel = new FrameSetting("The colours of items in the child frame are used to populate the colour wheel") { 299 @Override 300 protected void run(Frame frame) { 301 Item.FILL_COLOR_WHEEL = FrameUtils.getColorWheel(frame); 302 } 303 }; 304 305 public static final FrameSetting BackgroundColorWheel = new FrameSetting("The colours of items in the child frame are used to populate the colour wheel") { 306 @Override 307 protected void run(Frame frame) { 308 Frame.COLOR_WHEEL = FrameUtils.getColorWheel(frame); 293 public static final ArraySetting<Color> ColorWheel = new ArraySetting<Color>("The colours of items in the child frame are used to populate the colour wheel", 294 new Color[] { Color.BLACK, Color.RED, Color.BLUE, Item.GREEN, Color.MAGENTA, Color.YELLOW.darker(), Color.WHITE }) { 295 @Override 296 public boolean setSetting(Text text) { 297 Frame child = text.getChild(); 298 if (child == null) { 299 return false; 300 } 301 _value = FrameUtils.getColorWheel(child); 302 return true; 303 } 304 }; 305 306 public static final ArraySetting<Color> FillColorWheel = new ArraySetting<Color>("The colours of items in the child frame are used to populate the colour wheel", 307 new Color[] { new Color(255, 150, 150), new Color(150, 150, 255), new Color(150, 255, 150), 308 new Color(255, 150, 255), new Color(255, 255, 100), Color.WHITE, Color.BLACK }) { 309 @Override 310 public boolean setSetting(Text text) { 311 Frame child = text.getChild(); 312 if (child == null) { 313 return false; 314 } 315 _value = FrameUtils.getColorWheel(child); 316 return true; 317 } 318 }; 319 320 public static final ArraySetting<Color> BackgroundColorWheel = new ArraySetting<Color>("The colours of items in the child frame are used to populate the colour wheel", 321 new Color[] { new Color(235, 235, 235), new Color(225, 225, 255), new Color(195, 255, 255), 322 new Color(225, 255, 225), new Color(255, 255, 195), new Color(255, 225, 225), 323 new Color(255, 195, 255), Color.WHITE, Color.GRAY, Color.DARK_GRAY, Color.BLACK, null }) { 324 @Override 325 public boolean setSetting(Text text) { 326 Frame child = text.getChild(); 327 if (child == null) { 328 return false; 329 } 330 _value = FrameUtils.getColorWheel(child); 331 return true; 309 332 } 310 333 };
Note:
See TracChangeset
for help on using the changeset viewer.