Class SimFieldLabelRenderer

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
net.simplace.client.sim.graphpanel.renderer.SimFieldLabelRenderer
All Implemented Interfaces:
edu.uci.ics.jung.visualization.renderers.VertexLabelRenderer, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class SimFieldLabelRenderer extends JLabel implements edu.uci.ics.jung.visualization.renderers.VertexLabelRenderer, Serializable
DefaultVertexLabelRenderer is similar to the cell renderers used by the JTable and JTree jfc classes.
Author:
Tom Nelson
See Also:
  • Field Details

    • noFocusBorder

      protected static Border noFocusBorder
    • pickedVertexLabelColor

      protected Color pickedVertexLabelColor
  • Constructor Details

    • SimFieldLabelRenderer

      public SimFieldLabelRenderer(Color aPickedVertexLabelColor, SimEnvGraphPanel aGraphPanel)
      Creates a default table cell renderer.
      Parameters:
      aPickedVertexLabelColor -
      aGraphPanel -
  • Method Details

    • setForeground

      public void setForeground(Color c)
      Overrides JComponent.setForeground to assign the unselected-foreground color to the specified color.
      Overrides:
      setForeground in class JComponent
      Parameters:
      c - set the foreground color to this value
    • setBackground

      public void setBackground(Color c)
      Overrides JComponent.setBackground to assign the unselected-background color to the specified color.
      Overrides:
      setBackground in class JComponent
      Parameters:
      c - set the background color to this value
    • updateUI

      public void updateUI()
      Notification from the UIManager that the look and feel [L&F] has changed. Replaces the current UI object with the latest version from the UIManager.
      Overrides:
      updateUI in class JLabel
      See Also:
    • getVertexLabelRendererComponent

      public <FWSimFieldContainer> Component getVertexLabelRendererComponent(JComponent vv, Object value, Font font, boolean isSelected, FWSimFieldContainer aFieldContainer)
      Returns the default label renderer for a Vertex
      Specified by:
      getVertexLabelRendererComponent in interface edu.uci.ics.jung.visualization.renderers.VertexLabelRenderer
      Parameters:
      vv - the VisualizationViewer to render on
      value - the value to assign to the label for Vertex
      font -
      isSelected -
      aFieldContainer - the Vertex
      Returns:
      the default label renderer
    • isOpaque

      public boolean isOpaque()
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      isOpaque in class JComponent
    • validate

      public void validate()
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      validate in class Container
    • revalidate

      public void revalidate()
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      revalidate in class JComponent
    • repaint

      public void repaint(long tm, int x, int y, int width, int height)
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      repaint in class JComponent
    • repaint

      public void repaint(Rectangle r)
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      repaint in class JComponent
    • firePropertyChange

      protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      firePropertyChange in class Component
    • firePropertyChange

      public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
      Overridden for performance reasons. See the Implementation Note for more information.
      Overrides:
      firePropertyChange in class JComponent
    • setValue

      protected void setValue(Object value)
      Sets the String object for the cell being rendered to value.
      Parameters:
      value - the string value for this cell; if value is null it sets the text value to an empty string
      See Also: