- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/widgets/charts/AbstractChart.java
r919 r1102 20 20 21 21 import java.awt.BasicStroke; 22 import java.awt.Color;23 22 import java.awt.Component; 24 23 import java.awt.Font; 25 24 import java.awt.Paint; 26 import java.awt.Point;27 25 import java.awt.event.KeyEvent; 28 26 import java.awt.event.KeyListener; … … 35 33 import javax.swing.JPanel; 36 34 35 import org.expeditee.core.Colour; 36 import org.expeditee.core.Point; 37 import org.expeditee.gio.gesture.StandardGestureActions; 38 import org.expeditee.gio.swing.SwingConversions; 37 39 import org.expeditee.gui.ColorUtils; 40 import org.expeditee.gui.DisplayController; 38 41 import org.expeditee.gui.Frame; 39 42 import org.expeditee.gui.FrameGraphics; 40 43 import org.expeditee.gui.FrameIO; 41 import org.expeditee.gui.FrameKeyboardActions;42 import org.expeditee.gui.FrameMouseActions;43 44 import org.expeditee.gui.FunctionKey; 44 45 import org.expeditee.items.Text; … … 103 104 case SizeUp: 104 105 invalidateLink(); 105 FrameKeyboardActions.SetSize(getFirstCorner(), 1, false, 106 true, false); 106 StandardGestureActions.SetSize(getFirstCorner(), 1, false, true, false); 107 107 invalidateSelf(); 108 FrameGraphics.refresh(true);108 DisplayController.requestRefresh(true); 109 109 // FrameGraphics.requestRefresh(true); 110 110 break; 111 111 case SizeDown: 112 112 invalidateLink(); 113 FrameKeyboardActions.SetSize(getFirstCorner(), -1, false,113 StandardGestureActions.SetSize(getFirstCorner(), -1, false, 114 114 true, false); 115 115 invalidateSelf(); 116 FrameGraphics.refresh(true);116 DisplayController.requestRefresh(true); 117 117 // FrameGraphics.ForceRepaint(); 118 118 // FrameGraphics.refresh(true); … … 125 125 setSourceFillColor(null); 126 126 } else { 127 Colo r newColor = ColorUtils.getNextColor(127 Colour newColor = ColorUtils.getNextColor( 128 128 getSource().getFillColor(), 129 129 TemplateSettings.BackgroundColorWheel.get(), null); … … 134 134 setBackgroundColor(null); 135 135 } else { 136 Colo r newColor = ColorUtils.getNextColor(136 Colour newColor = ColorUtils.getNextColor( 137 137 getSource().getColor(), TemplateSettings.ColorWheel.get(), 138 138 null); … … 141 141 } 142 142 break; 143 default: 144 break; 143 145 } 144 146 } … … 148 150 149 151 public void keyTyped(KeyEvent e) { 150 FrameKeyboardActions.processChar(e.getKeyChar(), e152 StandardGestureActions.processChar(e.getKeyChar(), e 151 153 .isShiftDown()); 152 154 } … … 155 157 156 158 public void mouseClicked(MouseEvent e) { 157 FrameMouseActions.getInstance().mouseClicked(translateEvent(e));159 //StandardGestureActions.mouseClicked(translateEvent(e)); 158 160 } 159 161 … … 167 169 168 170 public void mousePressed(MouseEvent e) { 169 FrameMouseActions.getInstance().mousePressed(translateEvent(e));171 //StandardGestureActions.mousePressed(translateEvent(e)); 170 172 } 171 173 … … 180 182 181 183 public void mouseReleased(MouseEvent e) { 182 FrameMouseActions.getInstance() 183 .mouseReleased(translateEvent(e)); 184 //StandardGestureActions.mouseReleased(translateEvent(e)); 184 185 } 185 186 … … 272 273 if (foundData |= addCategoryData(categoryName, linkFrame 273 274 .getNonAnnotationText(true), swap)) { 274 Colo r backgroundColor = category.getBackgroundColor();275 Colour backgroundColor = category.getBackgroundColor(); 275 276 if (backgroundColor != null) 276 _paints.put(categoryName, backgroundColor);277 _paints.put(categoryName, SwingConversions.toSwingColor(backgroundColor)); 277 278 addSubject(linkFrame); 278 279 } … … 307 308 308 309 @Override 309 public void setBackgroundColor(Colo r c) {310 public void setBackgroundColor(Colour c) { 310 311 super.setBackgroundColor(c); 311 312 if (_chart == null) … … 314 315 _chart.setBackgroundPaint(JFreeChart.DEFAULT_BACKGROUND_PAINT); 315 316 } else { 316 _chart.setBackgroundPaint( c);317 } 318 } 319 320 @Override 321 public void setSourceColor(Colo r c) {317 _chart.setBackgroundPaint(SwingConversions.toSwingColor(c)); 318 } 319 } 320 321 @Override 322 public void setSourceColor(Colour c) { 322 323 super.setSourceColor(c); 323 324 if (_chart == null) … … 326 327 _chart.getTitle().setPaint(TextTitle.DEFAULT_TEXT_PAINT); 327 328 } else { 328 _chart.getTitle().setPaint( c);329 _chart.getTitle().setPaint(SwingConversions.toSwingColor(c)); 329 330 } 330 331 for (Title t : _chart.getSubtitles()) { … … 332 333 t.setPaint(TextTitle.DEFAULT_TEXT_PAINT); 333 334 } else { 334 t.setPaint( c);335 t.setPaint(SwingConversions.toSwingColor(c)); 335 336 } 336 337 } … … 338 339 if (legend != null) { 339 340 if (c == null) { 340 legend.setFrame(new BlockBorder( Color.black));341 legend.setFrame(new BlockBorder(SwingConversions.toSwingColor(Colour.BLACK))); 341 342 } else { 342 legend.setFrame(new BlockBorder( c));343 } 344 } 345 } 346 347 @Override 348 public void setSourceBorderColor(Colo r c) {343 legend.setFrame(new BlockBorder(SwingConversions.toSwingColor(c))); 344 } 345 } 346 } 347 348 @Override 349 public void setSourceBorderColor(Colour c) { 349 350 super.setSourceBorderColor(c); 350 351 if (_chart == null) … … 353 354 _chart.getPlot().setOutlinePaint(Plot.DEFAULT_OUTLINE_PAINT); 354 355 } else { 355 _chart.getPlot().setOutlinePaint( c);356 } 357 } 358 359 @Override 360 public void setSourceFillColor(Colo r c) {356 _chart.getPlot().setOutlinePaint(SwingConversions.toSwingColor(c)); 357 } 358 } 359 360 @Override 361 public void setSourceFillColor(Colour c) { 361 362 super.setSourceFillColor(c); 362 363 if (_chart == null) … … 368 369 legend.setBackgroundPaint(null); 369 370 } else { 370 _chart.getPlot().setBackgroundPaint( c);371 _chart.getPlot().setBackgroundPaint(SwingConversions.toSwingColor(c)); 371 372 if (legend != null) 372 legend.setBackgroundPaint( c);373 legend.setBackgroundPaint(SwingConversions.toSwingColor(c)); 373 374 } 374 375 } … … 387 388 if (legend != null) { 388 389 legend.setFrame(new BlockBorder(newThickness, newThickness, 389 newThickness, newThickness, getSource().getPaintColor()));390 newThickness, newThickness, SwingConversions.toSwingColor(getSource().getPaintColor()))); 390 391 legend.setItemFont(legend.getItemFont().deriveFont(fontSize)); 391 392 float pad = newThickness + 1;
Note:
See TracChangeset
for help on using the changeset viewer.