org.wilmascope.control
Class GraphControl.GraphElementFacade

java.lang.Object
  extended by org.wilmascope.control.GraphControl.GraphElementFacade
Direct Known Subclasses:
GraphControl.Edge, GraphControl.Node
Enclosing class:
GraphControl

public abstract class GraphControl.GraphElementFacade
extends java.lang.Object

the basic interface common to all GraphElements


Method Summary
 void addPickingClient(PickingClient client)
          set a PickingClient whose callback method will be called when the element is selected by picking with the mouse
 void defaultColour()
          revert to default colour
 void delete()
          delete the element, removing all references to it...
 java.awt.Color getColour()
           
 java.awt.Color getDefaultColour()
           
 java.lang.String getLabel()
           
 java.lang.Object getUserData()
           
 GraphElementView getView()
           
 java.lang.String getViewType()
           
 void hide()
          This will hide the element Clusters will have their view hidden but their constituents will still be visible (if they are already)
 void highlightColour()
          set to highlight colour
protected  void initView(GraphElementView view)
          A view is inited after it is attached to an element
 boolean isDefaultColour()
           
 void setColour(java.awt.Color colour)
           
 void setColour(float red, float green, float blue)
          set the colour of the component
 void setLabel(java.lang.String label)
          set the label to show with the element
 void setLabel(java.lang.String[] labelLines)
          set a multiline label to show with the element
 void setPickable(boolean pickable)
           
 void setUserData(java.lang.Object data)
           
 void show()
          Make element visible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initView

protected void initView(GraphElementView view)
A view is inited after it is attached to an element


hide

public void hide()
This will hide the element Clusters will have their view hidden but their constituents will still be visible (if they are already)


show

public void show()
Make element visible


setColour

public void setColour(float red,
                      float green,
                      float blue)
set the colour of the component

Parameters:
red - level of red (0-1f)
blue - level of blue (0-1f)
green - level of green (0-1f)

setColour

public void setColour(java.awt.Color colour)

getColour

public java.awt.Color getColour()

defaultColour

public void defaultColour()
revert to default colour


isDefaultColour

public boolean isDefaultColour()

getDefaultColour

public java.awt.Color getDefaultColour()

highlightColour

public void highlightColour()
set to highlight colour


setLabel

public void setLabel(java.lang.String label)
set the label to show with the element

Parameters:
label - the label to show

setLabel

public void setLabel(java.lang.String[] labelLines)
set a multiline label to show with the element

Parameters:
labelLines - an array of Strings that make up each of the lines of the label

getLabel

public java.lang.String getLabel()

setPickable

public void setPickable(boolean pickable)

addPickingClient

public void addPickingClient(PickingClient client)
set a PickingClient whose callback method will be called when the element is selected by picking with the mouse


getUserData

public java.lang.Object getUserData()

setUserData

public void setUserData(java.lang.Object data)

getViewType

public java.lang.String getViewType()

getView

public GraphElementView getView()

delete

public void delete()
delete the element, removing all references to it... forever!