fr.lifl.jedi.gui.display.colorGrid.view
Class ColorGridDisplayUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.PanelUI
          extended by 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:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Constructor Summary
ColorGridDisplayUI(int factor)
          Constructor of this UI
 
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
 

Constructor Detail

ColorGridDisplayUI

public ColorGridDisplayUI(int factor)
Constructor of this UI

Method Detail

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.