Class GraphElementComponent

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.graffiti.plugin.view.GraphElementComponent
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, GraphicAttributeConstants, GraffitiViewComponent, GraphElementComponentInterface
Direct Known Subclasses:
AbstractGraphElementComponent

public abstract class GraphElementComponent
extends JComponent
implements GraffitiViewComponent, GraphicAttributeConstants, GraphElementComponentInterface
Class that shares common members for all GraphElementComponents.
Version:
$Revision: 1.7 $
See Also:
Serialized Form
  • Constructor Details

    • GraphElementComponent

      public GraphElementComponent()
  • Method Details

    • contains

      public boolean contains​(int x, int y)
      Returns whether the given coordinates lie within this component and within its encapsulated shape. The coordinates are assumed to be relative to the coordinate system of this component.
      Overrides:
      contains in class JComponent
      See Also:
      Component.contains(int, int)
    • paintComponent

      public void paintComponent​(Graphics g)
      Paints the graph element contained in this component.
      Parameters:
      g - the graphics context in which to paint.
      See Also:
      JComponent.paintComponent(Graphics)