fr.lifl.jedi.gui.display.colorGrid.view
Class ColorGridDisplayUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.PanelUI
fr.lifl.jedi.gui.display.colorGrid.view.ColorGridDisplayUI
public class ColorGridDisplayUI
- extends javax.swing.plaf.PanelUI
Pluggable look and feel class that we use to display the simulation as a color grid.
- Version:
JEDI V 2.2 |
Created the 4th nov. 2008 |
Modified the 5th may 2009 |
- Author:
Method Summary |
void |
computeNewImage(javax.swing.JComponent c)
Performs the computation of the next image of the double buffer, and then switches buffers. |
void |
computePreferredSize(javax.swing.JComponent c)
Computes the preferred size of the component that displays the simulation. |
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
|
void |
setScaleChanged()
Tells the UI that the scale factor has changed. |
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installUI, uninstallUI, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorGridDisplayUI
public ColorGridDisplayUI(int factor)
- Constructor of this UI
computeNewImage
public void computeNewImage(javax.swing.JComponent c)
- Performs the computation of the next image of the double buffer, and then switches buffers.
- Parameters:
c
- The component where the display is made.
paint
public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
- Overrides:
paint
in class javax.swing.plaf.ComponentUI
- See Also:
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
computePreferredSize
public void computePreferredSize(javax.swing.JComponent c)
- Computes the preferred size of the component that displays the simulation.
- Parameters:
c
- The panel where the simulation is displayed.
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in class javax.swing.plaf.ComponentUI
- See Also:
ComponentUI.getPreferredSize(javax.swing.JComponent)
setScaleChanged
public void setScaleChanged()
- Tells the UI that the scale factor has changed.