org.joone.edit
Class ConcreteGenericFigure
- java.lang.Object
-
- CH.ifa.draw.standard.AbstractFigure
-
- CH.ifa.draw.standard.CompositeFigure
-
- org.joone.edit.ConcreteGenericFigure
-
- All Implemented Interfaces:
- Figure, FigureChangeListener, Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, GenericFigure, UpdatableFigure
- Direct Known Subclasses:
- LayerFigure, MonitorPluginFigure
public abstract class ConcreteGenericFigure extends CompositeFigure implements GenericFigure, UpdatableFigure
Graphic representation of a generic figure in the net- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static ILoggerlogLogger-
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
-
-
Constructor Summary
Constructors Constructor and Description ConcreteGenericFigure()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidbasicDisplayBox(java.awt.Point origin, java.awt.Point corner)Sets the display box of a figure.booleancanConnect(GenericFigure start, ConnectionFigure conn)java.awt.InsetsconnectionInsets()Returns the connection inset.java.awt.RectangledisplayBox()Gets the display box of a figure.voiddraw(java.awt.Graphics g)Draws all the contained figuresvoidfigureChanged(FigureChangeEvent e)Sent when a figure changedvoidfigureRemoved(FigureChangeEvent e)Sent when a figure was removedabstract java.lang.ObjectgetLayer()Get the Layer objectjava.lang.ObjectgetParam(java.lang.Object key)Used to get a parameter by namejavax.swing.JPopupMenugetPopupMenu(PropertySheet ps, DrawingView view)Get the popup menu for this figure.abstract WrappergetWrapper()Returns the wrapper for the Figurejava.util.Vectorhandles()Returns the handles of a Figure that can be used to manipulate some of its attributes.voidinitialize()voidnotifyPostConn()voidread(StorableInput dr)Reads the contained figures from StorableInput.voidsetParam(java.lang.Object key, java.lang.Object newParam)Sets a parameter of the layervoidsetParams(java.util.Hashtable newParams)Used to set all parameters of the layervoidupdate()voidupdate(FigureChangeEvent e)voidwrite(StorableOutput dw)Writes the contained figures to the StorableOutput.-
Methods inherited from class CH.ifa.draw.standard.CompositeFigure
add, addAll, bringToFront, figureAt, figureCount, figureInvalidated, figureRequestRemove, figureRequestUpdate, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, includes, orphan, orphanAll, release, remove, removeAll, removeAll, replace, sendToBack
-
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, getAttribute, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, size, willChange
-
-
-
-
Field Detail
-
log
public static final ILogger log
Logger
-
-
Method Detail
-
displayBox
public java.awt.Rectangle displayBox()
Description copied from class:AbstractFigureGets the display box of a figure.- Specified by:
displayBoxin interfaceFigure- Specified by:
displayBoxin classAbstractFigure- See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
-
basicDisplayBox
public void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)Description copied from class:AbstractFigureSets the display box of a figure. This is the method that subclassers override. Clients usually call displayBox.- Specified by:
basicDisplayBoxin interfaceFigure- Specified by:
basicDisplayBoxin classAbstractFigure- Parameters:
origin- the new origincorner- the new corner- See Also:
AbstractFigure.displayBox(java.awt.Point, java.awt.Point)
-
draw
public void draw(java.awt.Graphics g)
Description copied from class:CompositeFigureDraws all the contained figures- Specified by:
drawin interfaceFigure- Overrides:
drawin classCompositeFigure- Parameters:
g- the Graphics to draw into- See Also:
Figure.draw(java.awt.Graphics)
-
handles
public java.util.Vector handles()
Description copied from class:AbstractFigureReturns the handles of a Figure that can be used to manipulate some of its attributes.- Specified by:
handlesin interfaceFigure- Specified by:
handlesin classAbstractFigure- Returns:
- a Vector of handles
- See Also:
Handle
-
initialize
public void initialize()
-
update
public void update(FigureChangeEvent e)
-
update
public void update()
- Specified by:
updatein interfaceUpdatableFigure
-
figureChanged
public void figureChanged(FigureChangeEvent e)
Description copied from interface:FigureChangeListenerSent when a figure changed- Specified by:
figureChangedin interfaceFigureChangeListener- Overrides:
figureChangedin classCompositeFigure
-
figureRemoved
public void figureRemoved(FigureChangeEvent e)
Description copied from interface:FigureChangeListenerSent when a figure was removed- Specified by:
figureRemovedin interfaceFigureChangeListener- Overrides:
figureRemovedin classCompositeFigure
-
notifyPostConn
public void notifyPostConn()
-
write
public void write(StorableOutput dw)
Description copied from class:CompositeFigureWrites the contained figures to the StorableOutput.- Specified by:
writein interfaceStorable- Overrides:
writein classCompositeFigure
-
read
public void read(StorableInput dr) throws java.io.IOException
Description copied from class:CompositeFigureReads the contained figures from StorableInput.- Specified by:
readin interfaceStorable- Overrides:
readin classCompositeFigure- Throws:
java.io.IOException
-
connectionInsets
public java.awt.Insets connectionInsets()
Description copied from class:AbstractFigureReturns the connection inset. The connection inset defines the area where the display box of a figure can't be connected. By default the entire display box can be connected.- Specified by:
connectionInsetsin interfaceFigure- Overrides:
connectionInsetsin classAbstractFigure
-
getParam
public java.lang.Object getParam(java.lang.Object key)
Used to get a parameter by name- Specified by:
getParamin interfaceGenericFigure- Parameters:
key- the parameter's name- Returns:
- the parameter's value
-
setParam
public void setParam(java.lang.Object key, java.lang.Object newParam)Sets a parameter of the layer- Specified by:
setParamin interfaceGenericFigure- Parameters:
key- the parameter's namenewParam- The parameter's value
-
setParams
public void setParams(java.util.Hashtable newParams)
Used to set all parameters of the layer- Specified by:
setParamsin interfaceGenericFigure- Parameters:
newParams- java.util.Hashtable
-
getWrapper
public abstract Wrapper getWrapper()
Returns the wrapper for the Figure- Specified by:
getWrapperin interfaceGenericFigure- Returns:
- the Wrapper object
-
canConnect
public boolean canConnect(GenericFigure start, ConnectionFigure conn)
- Specified by:
canConnectin interfaceGenericFigure
-
getLayer
public abstract java.lang.Object getLayer()
Get the Layer object- Returns:
- the Layer object
-
getPopupMenu
public javax.swing.JPopupMenu getPopupMenu(PropertySheet ps, DrawingView view)
Get the popup menu for this figure. Put here all the popup menu items common to all the figures; override this method to differentiate the menu items.- Parameters:
ps- the property sheet to use in the Properties option.- Returns:
- the popup menu.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG