public class P2DCanvas extends FwkPanel implements P2DCanvasInterface, P2DRepaintListenerInterface, javax.swing.event.MouseInputListener, P2DOrderListenerInterface, FwkPrintableInterface
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected P2DContainerInterface |
active |
protected FwkArray |
components
The components in this container.
|
protected static FwkDescriptionInterface |
descriptor |
protected javax.infobus.InfoBusMemberSupport |
infoBusMemberSupport |
protected java.awt.event.MouseEvent |
lastMouseEvent |
protected javax.swing.event.EventListenerList |
listenerList
The mouse motion listener list.
|
protected java.awt.geom.Point2D |
localMousePoint |
protected P2DContainerInterface |
parent |
protected boolean |
selectable |
static java.lang.String |
version |
bgImage, controller, fwkItem, imgHeight, imgWidth, lineAppearance, newHeight, newWidth, pageFormat, readingDOM, text, textAppearance, xalign, yalignaccessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTBOTTOM, CENTER, LEFT, RIGHT, TOPINFOBUS_SOURCEAUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME| Constructor and Description |
|---|
P2DCanvas()
Constructs a new Canvas.
|
P2DCanvas(java.lang.String name)
Constructs a new Canvas.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContainerListener(P2DContainerListenerInterface listener)
Add a container listener.
|
void |
addFocusListener(java.awt.event.FocusListener l)
Adds the specified focus listener to receive focus events
from this component.
|
void |
addInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener that will be alerted whenever the InfoBusMember's
setInfoBus method is called and not vetoed.
|
void |
addInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
Adds a VetoableChangeListener to the list of listeners that will be
alerted whenever the InfoBusMember's setInfoBus method is called.
|
void |
addListener(java.lang.Class clazz,
java.util.EventListener listener)
Adds a order listener.
|
void |
addMouseListener(java.awt.event.MouseListener l)
Adds the specified mouse input listener to receive mouse events
from this component.
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events
from this component.
|
void |
addOrderListener(P2DOrderListenerInterface l)
Adds a order listener.
|
P2DContainerInterface |
addP2D(P2DContainerInterface comp)
Adds the specified component to the end of this container.
|
P2DContainerInterface |
addP2D(P2DContainerInterface comp,
int index)
Adds the specified component to this container at the given
position.
|
P2DContainerInterface |
addP2D(java.lang.String name)
Adds the specified component to the end of this container.
|
P2DContainerInterface |
addP2D(java.lang.String name,
int index)
Adds the specified component to this container at the given
position.
|
protected P2DContainerInterface |
addP2DImpl(P2DContainerInterface comp,
java.lang.Object constraints,
int index)
Adds the specified component to this container at the specified
index.
|
void |
addRepaintListener(P2DRepaintListenerInterface listener)
Add a repaint listener.
|
void |
configure(java.awt.Graphics2D g)
Configurate the graphical context with the settings of the appearance.
|
boolean |
destroyController()
Destroy the controller.
|
protected void |
fireContainerAddedEvent(P2DContainerInterface container)
Fire a container add event.
|
protected void |
fireContainerRemovedEvent(P2DContainerInterface container)
Fire a container remove event.
|
void |
fireOrderEvent(boolean flag)
Fire an order event.
|
boolean |
getActive(P2DContainerInterface container)
Get the active flag.
|
P2DContainerInterface |
getActiveComponent(P2DContainerInterface container)
Get the active component.
|
void |
getAllArmedComponents(P2DContainerInterface container,
double x,
double y,
FwkArrayInterface arr)
return all armed component.
|
void |
getAllArmedComponents(P2DContainerInterface container,
java.awt.geom.Point2D p,
FwkArrayInterface arr)
return all armed component.
|
FwkAppearanceInterface |
getAppearance()
Retrieve the appearance of the component.
|
P2DContainerInterface |
getArmedComponent(double x,
double y)
return the armed component.
|
java.awt.Color |
getBackgroundColor()
Gets the background color.
|
P2DBoundingBoxInterface |
getBoundingBox()
Get the scaling box of the canvas.
|
java.awt.Shape |
getClip()
Gets the clipping shape.
|
java.awt.Color |
getColor()
Gets the color.
|
FwkCommandInterface[] |
getCommands()
Get the commands of the canvas.
|
FwkCommandInterface[] |
getComponentCommands()
Get the commands of all components.
|
FwkArrayInterface |
getContainerListenerArray()
Get an array containing the container listenres.
|
float[] |
getDashArray()
Returns the array representing the lengths of the
dash segments.
|
float |
getDashPhase()
Returns the current dash phase.
|
static FwkDescriptionInterface |
getDescriptor() |
int |
getEndCap()
Returns the end cap style.
|
java.awt.Shape |
getFill()
Gets the filling shape.
|
FwkArrayInterface |
getFocusListenerArray()
Get an array containing the focus listenres.
|
java.awt.Font |
getFont()
Retrieves the Font of the component.
|
javax.infobus.InfoBus |
getInfoBus()
Returns the InfoBus which is currently assigned to the InfoBusMember's
InfoBus property.
|
java.lang.String |
getInfoBusName()
Get the infobus name.
|
int |
getLineJoin()
Returns the line join style.
|
float |
getLineWidth()
Returns the line width.
|
FwkArrayInterface |
getListenerArray(java.lang.Class clazz)
Get the array containing the order listeners.
|
java.util.EventListener[] |
getListeners(java.lang.Class clazz) |
java.lang.String |
getMemberName()
Get the bus member name.
|
float |
getMiterLimit()
Returns the limit of miter joins.
|
FwkArrayInterface |
getMouseListenerArray()
Get an array containing the mouse listenres.
|
FwkArrayInterface |
getMouseMotionListenerArray()
Get an array containing the mouse motion listenres.
|
java.awt.Image |
getOffScreenImage()
Get the offscreen image of the canvas.
|
FwkArrayInterface |
getOrderListenerArray()
Get the array containing the order listeners.
|
P2DContainerInterface[] |
getP2D(java.lang.Class clazz)
Retrieves the specified component class from this container.
|
P2DContainerInterface[] |
getP2D(java.lang.Class clazz,
java.lang.String name)
Retrieves the specified component class from this container.
|
P2DContainerInterface |
getP2D(int index)
Gets the component, specified by
index,
from this container. |
FwkArrayInterface |
getP2DComponentArray()
Gets all the components in this container.
|
FwkArrayInterface |
getP2DComponents()
Gets all the components in this container.
|
P2DContainerInterface |
getParentContainer()
Get the parent container of this component.
|
java.awt.Dimension |
getPreferredSize()
Get the preferred size.
|
FwkArrayInterface |
getRepaintListenerArray()
Get an array containing the repaint listenres.
|
boolean |
getSelectable()
Get a boolean indicates whether the container is selectable.
|
java.lang.String |
getShortName()
Get the short name of the container.
|
java.awt.Stroke |
getStroke()
Gets the Stroke for the Graphics2D context.
|
java.lang.String |
getTitle()
Get the title of the canvas.
|
java.awt.geom.AffineTransform |
getTransform()
Retrieve the transform of the component.
|
java.awt.geom.Point2D |
getTranslation()
Retrieves the translation vector.
|
float |
getTransparency()
Gets the transparency of the component color.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
boolean |
getVisible()
Returns a boolean whether the component is visble.
|
protected void |
init()
Initialize the container
|
boolean |
isConnected()
Returns a boolean whether the member is connected to an infobus.
|
void |
joinInfoBus(java.lang.String infoBusName)
Join to the infobus.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
The callback that is called if the mouse was clicked.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
The callback that is called if the mouse was dragged.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
The callback that is called if the mouse was entered.
|
void |
mouseExited(java.awt.event.MouseEvent e)
The callback that is called if the mouse was exited.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
The callback that is called if the mouse was moved.
|
void |
mousePressed(java.awt.event.MouseEvent e)
The callback that is called if the mouse was pressed.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
The callback that is called if the mouse was released.
|
boolean |
openPopupMenu(java.awt.event.MouseEvent ev)
Open the popup menu.
|
void |
paint(java.awt.Graphics g)
The paint method.
|
protected void |
paintChildren(java.awt.Graphics g)
Paint this component's children.
|
void |
popToFront(P2DOrderEventInterface event)
This method is invoked when the component should be poped to front.
|
void |
printPanel(java.awt.Graphics g)
Print the canvas content.
|
void |
processFocusEvent(java.awt.event.FocusEvent e)
Process the mouse event.
|
void |
processMouseEvent(java.awt.event.MouseEvent e)
Process the mouse event.
|
void |
pushToBack(P2DOrderEventInterface event)
This method is invoked when the component should be pushed to back.
|
java.lang.Object |
readConstructor(org.w3c.dom.Document document,
org.w3c.dom.Element node)
Read a construtor dom node.
|
void |
readFromDOM(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
Read from DOM
|
void |
release()
Release object.
|
void |
removeAllP2D()
Removes all the components from this container.
|
void |
removeContainerListener(P2DContainerListenerInterface listener)
Remove a container listener.
|
void |
removeFocusListener(java.awt.event.FocusListener l)
Removes the specified container listener so it no longer receives
mouse events from this component.
|
void |
removeInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener from the list of listeners requesting
notification of an InfoBus change.
|
void |
removeInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
Removes a VetoableChangeListener from the list of listeners that will
be alerted whenever the InfoBusMember's setInfoBus method is called.
|
void |
removeListener(java.lang.Class clazz,
java.util.EventListener listener)
Removes an order listener.
|
void |
removeMouseListener(java.awt.event.MouseListener l)
Removes the specified container listener so it no longer receives
mouse events from this component.
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener l)
Removes the specified container listener so it no longer receives
mouse motion events from this component.
|
void |
removeNotify()
Makes this Component undisplayable by destroying it native screen resource.
|
void |
removeOrderListener(P2DOrderListenerInterface l)
Removes an order listener.
|
P2DContainerInterface |
removeP2D(int index)
Removes the component, specified by
index,
from this container. |
P2DContainerInterface |
removeP2D(P2DContainerInterface comp)
Removes the specified component from this container.
|
void |
removeRepaintListener(P2DRepaintListenerInterface listener)
Remove a repaint listener.
|
void |
repaint()
Repaint the container.
|
java.awt.event.MouseEvent |
restoreLastMouseEvent()
Restore last mouse event.
|
java.awt.geom.Point2D |
restoreLocalMousePoint()
Restore local mouse point.
|
void |
revalidate(boolean recursive)
Revalidate the component.
|
void |
saveLastMouseEvent(java.awt.event.MouseEvent ev)
Save the last mouse event.
|
void |
saveLocalMousePoint(java.awt.geom.Point2D p)
Save the local mouse point.
|
void |
setActive(P2DContainerInterface container,
boolean flag)
Activate the component.
|
void |
setActiveComponent(P2DContainerInterface container,
P2DContainerInterface component)
Set the active component.
|
void |
setAppearance(FwkAppearanceInterface ap)
Sets the appearance of the component.
|
void |
setBackgroundColor(java.awt.Color color)
Sets the background color.
|
void |
setBoundingBox(P2DBoundingBoxInterface boundingBox)
Set the scaling box of the canvas.
|
void |
setBounds(int x,
int y,
int w,
int h)
Set the size of the canvas.
|
void |
setClip(double x,
double y,
double width,
double height)
Sets the current clip to the rectangle specified by the given coordinates.
|
void |
setClip(java.awt.Shape clip)
Sets the current clipping area to an arbitrary clip shape.
|
void |
setColor(java.awt.Color color)
Sets the color.
|
void |
setDashArray(float[] arr)
Sets the array representing the lengths of the
dash segments.
|
void |
setDashPhase(float phase)
Sets the current dash phase.
|
void |
setEndCap(int cap)
Retrieves the end cap style.
|
void |
setFill(java.awt.Shape s)
Fills the interior of a Shape using the settings of the Graphics2D context.
|
void |
setFont(java.awt.Font newFont)
Set a new 3D-ont for the component.
|
void |
setInfoBus(javax.infobus.InfoBus newInfoBus)
Sets the InfoBus object for this InfoBusMember, if not vetoed.}
|
void |
setInfoBusName(java.lang.String newName)
Set the infobus name.
|
void |
setLineJoin(int join)
Retrieves the line join style.
|
void |
setLineWidth(float w)
Sets the line width of the stroke.
|
void |
setMemberName(java.lang.String dataItemName)
Set the name of the member.
|
void |
setMiterLimit(float limit)
Retrieves the limit of miter joins.
|
void |
setParentContainer(P2DContainerInterface container)
Set the parent container of the component.
|
void |
setPreferredSize(java.awt.Dimension size)
Sets the preferred size of the receiving component.
|
void |
setScale(double sx,
double sy)
Sets the possibly non-uniform scale component of the current transform.
|
void |
setSelectable(boolean flag)
Set the container selectable.
|
void |
setSize(java.awt.Dimension size)
Set the dimension of the canvas.
|
void |
setStroke(java.awt.Stroke s)
Sets the Stroke for the Graphics2D context.
|
void |
setTransform(java.awt.geom.AffineTransform trans)
Sets the transform of the component.
|
void |
setTranslation(double x,
double y)
Concatenates the current Graphics2D Transform with a translation transform.
|
void |
setTranslation(java.awt.geom.Point2D translate)
Replaces the translational components of this transform to the values
in the Point2D argument.
|
void |
setTransparency(float transparency)
Sets the transparency of the component color.
|
void |
setVisible(boolean flag)
Sets the visibility of the component.
|
void |
toBack()
Move this component to back inside the parent container.
|
void |
toBack(int index)
Move the component with the given index to the back (first array position).
|
void |
toBack(P2DContainerInterface container)
Move the given component to the back (first array position).
|
void |
toFront()
Move this component to front inside the parent container.
|
void |
toFront(int index)
Move the component with the given index to the front (last array position).
|
void |
toFront(P2DContainerInterface container)
Move the given component to the front (last array position).
|
java.lang.String |
toString()
Returns String presentation of the canvas.
|
void |
unregister()
Unregister the canvas from infobus.
|
org.w3c.dom.Element |
writeConstructor(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
Write a construtor dom node.
|
org.w3c.dom.Element |
writeToDOM(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
Write the container as child to the given DOM node.
|
boolean |
writeToXML(java.lang.String filename,
boolean validate)
Writes the canvas to an XML file.
|
addCommand, addCommand, addPropertyChangeListener, addPropertyChangeListener, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, commandsAvailable, compareTo, deleteGroup, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getClassName, getCommand, getCommands, getCompany, getCompanyInternetAddress, getController, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getGroup, getIcon, getIcon, getIconKey, getIconKey, getInstanceDescriptor, getName, getNumberOfPages, getPageFormat, getPersistentObjectNames, getPresentationString, getPresentationString, getPrintable, getPrintJobName, getProperty, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, getPropertyGroup, getSource, getSupportEMail, getTitleName, getTransferData, getTransferDataFlavors, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, isDataFlavorSupported, isPropertyChangeEventSuspended, lostOwnership, paintComponent, print, readingDOM, readingDOM, refresh, removeCommand, removeFromGroup, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBackgroundImage, setBuild, setClassName, setCommands, setCompany, setCompanyInternetAddress, setController, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setLineAppearance, setName, setPageFormat, setProperty, setPropertyGroup, setSource, setSupportEMail, setText, setTextAlignment, setTextAppearance, setTitleName, suspendChangeManager, suspendPropertyChangeEventsgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateImagegetTreeLockadd, getTitleName, refresh, setTitleNamegetController, setControllergetCompany, readingDOM, readingDOMgetPrintJobName, setPageFormatfireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManagergetCommands, getPersistentObjectNamesaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEventsaddVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListenergetAuthor, getBuild, getClassName, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getName, getPresentationString, getPresentationString, getSupportEMail, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setName, setSupportEMailgetTransferData, getTransferDataFlavors, isDataFlavorSupportedaddCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getGroup, groupExists, removeCommand, removeFromGroup, setCommandsgetPresentationString, getPresentationStringpublic static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
protected java.awt.event.MouseEvent lastMouseEvent
protected java.awt.geom.Point2D localMousePoint
protected P2DContainerInterface parent
protected P2DContainerInterface active
protected boolean selectable
protected FwkArray components
#add(P2DContainerInterface),
#add(P2DContainerInterface, int),
#add(P2DContainerInterface, java.lang.Object),
Container.getComponents()protected javax.swing.event.EventListenerList listenerList
protected javax.infobus.InfoBusMemberSupport infoBusMemberSupport
public P2DCanvas()
public P2DCanvas(java.lang.String name)
public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacegetVersion in class FwkPanelpublic static FwkDescriptionInterface getDescriptor()
public void release()
release in interface FwkInterfacerelease in interface javax.infobus.DataItemrelease in class FwkPanelpublic java.lang.String getTitle()
getTitle in interface FwkDescriptionInterfacegetTitle in interface FwkPanelInterfacegetTitle in class FwkPanelpublic void unregister()
unregister in interface P2DContainerInterfacepublic java.lang.String toString()
toString in class java.awt.Componentprotected void init()
public void printPanel(java.awt.Graphics g)
printPanel in interface FwkPanelInterfaceprintPanel in class FwkPanelg - The graphical contents.protected void paintChildren(java.awt.Graphics g)
paintChildren in class javax.swing.JComponentpaint(java.awt.Graphics),
Container.paint(java.awt.Graphics)public void revalidate(boolean recursive)
revalidate in interface P2DContainerInterfacepublic void removeNotify()
removeNotify in class javax.swing.JComponentpublic void setActiveComponent(P2DContainerInterface container, P2DContainerInterface component)
setActiveComponent in interface P2DContainerInterfacecomponent - The component.public P2DContainerInterface getActiveComponent(P2DContainerInterface container)
getActiveComponent in interface P2DContainerInterfacepublic boolean destroyController()
destroyController in interface FwkControllerInterfacedestroyController in class FwkPanelpublic void setAppearance(FwkAppearanceInterface ap)
ap - The appearance.public FwkAppearanceInterface getAppearance()
public void setLineWidth(float w)
w - The line width.BasicStrokepublic float getLineWidth()
BasicStrokepublic void setDashArray(float[] arr)
arr - The segment array.BasicStrokepublic float[] getDashArray()
BasicStrokepublic void setDashPhase(float phase)
phase - the dash phase.BasicStrokepublic float getDashPhase()
BasicStrokepublic void setEndCap(int cap)
BasicStrokepublic int getEndCap()
BasicStrokepublic void setLineJoin(int join)
join - the line join style.BasicStrokepublic int getLineJoin()
BasicStrokepublic void setMiterLimit(float limit)
limit - the limit.BasicStrokepublic float getMiterLimit()
BasicStrokepublic java.awt.Font getFont()
getFont in interface java.awt.MenuContainergetFont in class java.awt.Componentpublic void setFont(java.awt.Font newFont)
setFont in class javax.swing.JComponentnewFont - The new font to be used to draw the appearance.public void setColor(java.awt.Color color)
throws FwkException
color - The new color of the shape.FwkExceptionColorpublic java.awt.Color getColor()
throws FwkException
FwkExceptionColorpublic void setTransparency(float transparency)
transparency - The new transparency value.public float getTransparency()
public java.awt.geom.AffineTransform getTransform()
public void setTransform(java.awt.geom.AffineTransform trans)
trans - The transformation matrix.public void setTranslation(java.awt.geom.Point2D translate)
translate - - the translational componentpublic void setTranslation(double x,
double y)
x - Translation in xy - Translation in yGraphics2Dpublic java.awt.geom.Point2D getTranslation()
setTranslation(Point2D)public void setClip(double x,
double y,
double width,
double height)
x, - y, width, heigth The bounding box.public void setClip(java.awt.Shape clip)
clip - The clipping shape.Shapepublic java.awt.Shape getClip()
Shapepublic void setStroke(java.awt.Stroke s)
s - The Stroke style.Strokepublic java.awt.Stroke getStroke()
Strokepublic void setFill(java.awt.Shape s)
s - the filling shape.Shapepublic java.awt.Shape getFill()
Shapepublic boolean getVisible()
public void setVisible(boolean flag)
setVisible in class javax.swing.JComponentflag - The flag that indicates the visiblity of the component.public void configure(java.awt.Graphics2D g)
g - The Graphical context.public void setScale(double sx,
double sy)
sx - scale value in x.sy - scale value in y.public void setBackgroundColor(java.awt.Color color)
color - The new background color.Colorpublic java.awt.Color getBackgroundColor()
Colorpublic FwkArrayInterface getP2DComponents()
getP2DComponents in interface P2DContainerInterfacepublic FwkArrayInterface getP2DComponentArray()
getP2DComponentArray in interface P2DContainerInterfacepublic P2DContainerInterface addP2D(P2DContainerInterface comp)
addP2D in interface P2DContainerInterfacecomp - the component to be added.public P2DContainerInterface addP2D(java.lang.String name, int index)
addP2D in interface P2DContainerInterfacename - the component's to be added.index - the position at which to insert the component,
or -1 to insert the component at the end.compContainer.remove(int),
#add(String)public P2DContainerInterface addP2D(java.lang.String name)
addP2D in interface P2DContainerInterfacename - The component's name. The component is found on InfoBus.public P2DContainerInterface addP2D(P2DContainerInterface comp, int index)
addP2D in interface P2DContainerInterfacecomp - the component to be added.index - the position at which to insert the component,
or -1 to insert the component at the end.compContainer.remove(int)protected P2DContainerInterface addP2DImpl(P2DContainerInterface comp, java.lang.Object constraints, int index)
This is the method to override if a program needs to track every add request to a container. An overriding method should usually include a call to the superclass's version of the method:
super.addImpl(comp, constraints, index)
comp - the component to be added.constraints - an object expressing layout contraints
for this component.index - the position in the container's list at which to
insert the component, where -1
means insert at the end.#add(P2DComponent),
#add(P2DComponent, int),
#add(P2DComponent, java.lang.Object)public P2DContainerInterface removeP2D(int index)
index,
from this container. removeP2D in interface P2DContainerInterfaceindex - the index of the component to be removed.Container.add(java.awt.Component)public P2DContainerInterface removeP2D(P2DContainerInterface comp)
removeP2D in interface P2DContainerInterfacecomp - the component to be removedContainer.add(java.awt.Component)public P2DContainerInterface getP2D(int index)
index,
from this container.getP2D in interface P2DContainerInterfaceindex - the index of the component to be retrieved.the - element that was retrieved or null if not available.Container.add(java.awt.Component)public P2DContainerInterface[] getP2D(java.lang.Class clazz)
getP2D in interface P2DContainerInterfacecomp - the components to be retrievedthe - elements that were retrieved or null if not available.Container.add(java.awt.Component)public P2DContainerInterface[] getP2D(java.lang.Class clazz, java.lang.String name)
getP2D in interface P2DContainerInterfaceclazz - the child class.name - the name of the component.an - array containing component implementing the specified class and
with the specified name.public void removeAllP2D()
removeAllP2D in interface P2DContainerInterfaceContainer.add(java.awt.Component),
Container.remove(int)public void toFront()
toFront in interface P2DContainerInterfacepublic void toFront(int index)
toFront in interface P2DContainerInterfaceindex - The index of the component to be moved.public void toFront(P2DContainerInterface container)
toFront in interface P2DContainerInterfacecontainer - The component to be moved.public void toBack()
toBack in interface P2DContainerInterfacepublic void toBack(int index)
toBack in interface P2DContainerInterfaceindex - The index of the component to be moved.public void toBack(P2DContainerInterface container)
toBack in interface P2DContainerInterfacecontainer - The component to be moved.public void setParentContainer(P2DContainerInterface container)
setParentContainer in interface P2DContainerInterfacecontainer - The parent container.getParentContainerpublic P2DContainerInterface getParentContainer()
getParentContainer in interface P2DContainerInterfacesetParentContainerpublic void getAllArmedComponents(P2DContainerInterface container, java.awt.geom.Point2D p, FwkArrayInterface arr)
getAllArmedComponents in interface P2DContainerInterfacep - The armed coordinates.arr - The array to collect all armed components.public void getAllArmedComponents(P2DContainerInterface container, double x, double y, FwkArrayInterface arr)
getAllArmedComponents in interface P2DContainerInterfacex - The x part of the armed coordinate.y - The y part of the armed coordinate.arr - The array to collect all armed components.public P2DContainerInterface getArmedComponent(double x, double y)
getArmedComponent in interface P2DContainerInterfacepublic void processFocusEvent(java.awt.event.FocusEvent e)
processFocusEvent in interface P2DContainerInterfaceprocessFocusEvent in class java.awt.ComponentComponentpublic void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent in interface P2DContainerInterfaceprocessMouseEvent in class javax.swing.JComponentComponentpublic FwkCommandInterface[] getCommands()
getCommands in interface FwkInstructionInterfacegetCommands in class FwkPanelpublic P2DBoundingBoxInterface getBoundingBox()
getBoundingBox in interface P2DCanvasInterfacepublic void setBoundingBox(P2DBoundingBoxInterface boundingBox)
the - new scaling box.public void setPreferredSize(java.awt.Dimension size)
setPreferredSize in class javax.swing.JComponentsize - The preferred size.public void setSize(java.awt.Dimension size)
setSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentg - The graphical context.public java.awt.Image getOffScreenImage()
getOffScreenImage in interface P2DCanvasInterfacepublic void repaint()
repaint in interface P2DContainerInterfacerepaint in interface P2DRepaintListenerInterfacerepaint in class java.awt.Componentpublic void setActive(P2DContainerInterface container, boolean flag)
setActive in interface P2DContainerInterfaceflag - true if the component should be activated.public boolean getActive(P2DContainerInterface container)
getActive in interface P2DContainerInterfacepublic void setBounds(int x,
int y,
int w,
int h)
setBounds in class java.awt.Componentdim - the new dimension.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void popToFront(P2DOrderEventInterface event)
popToFront in interface P2DOrderListenerInterfaceevent - The order event.public void pushToBack(P2DOrderEventInterface event)
pushToBack in interface P2DOrderListenerInterfaceevent - The order event.public java.lang.String getMemberName()
getMemberName in interface FwkInfoBusMemberInterfacesetMemberName(java.lang.String)public void setMemberName(java.lang.String dataItemName)
throws FwkException
Example: myConsumer@myInfoBus
The name of the item is myConsumer and the name of the InfoBus is myInfoBus. This routine fires a PropertyChangeEvent on propterty MemberName.
setMemberName in interface FwkInfoBusMemberInterfacememberName - The new name of the member.FwkExceptionpublic void joinInfoBus(java.lang.String infoBusName)
throws FwkException
FwkExceptionpublic boolean isConnected()
isConnected in interface FwkInfoBusMemberInterfacepublic java.lang.String getInfoBusName()
getInfoBusName in interface FwkInfoBusMemberInterfacepublic void setInfoBusName(java.lang.String newName)
setInfoBusName in interface FwkInfoBusMemberInterfaceThe - new name of the infobus.public void addInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
addInfoBusPropertyListener in interface javax.infobus.InfoBusMemberpcl - The PropertyChangeListener.public void addInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
addInfoBusVetoableListener in interface javax.infobus.InfoBusMembervcl - The VetoableChangeListener.public javax.infobus.InfoBus getInfoBus()
getInfoBus in interface javax.infobus.InfoBusMemberpublic void removeInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
removeInfoBusPropertyListener in interface javax.infobus.InfoBusMemberpcl - The propertyChangeListener.public void removeInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
removeInfoBusVetoableListener in interface javax.infobus.InfoBusMembervcl - The VetoableChangeListener.public void setInfoBus(javax.infobus.InfoBus newInfoBus)
throws java.beans.PropertyVetoException
setInfoBus in interface javax.infobus.InfoBusMemberThe - new infobus.java.beans.PropertyVetoExceptionpublic FwkArrayInterface getMouseMotionListenerArray()
getMouseMotionListenerArray in interface P2DContainerInterfacepublic void addMouseMotionListener(java.awt.event.MouseMotionListener l)
addMouseMotionListener in interface P2DContainerInterfaceaddMouseMotionListener in class java.awt.Componentl - the mouse motion listenerpublic void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
removeMouseMotionListener in interface P2DContainerInterfaceremoveMouseMotionListener in class java.awt.Componentl - the mouse motion listenerpublic FwkArrayInterface getMouseListenerArray()
getMouseListenerArray in interface P2DContainerInterfacepublic void addMouseListener(java.awt.event.MouseListener l)
addMouseListener in interface P2DContainerInterfaceaddMouseListener in class java.awt.Componentl - the mouse input listenerpublic void removeMouseListener(java.awt.event.MouseListener l)
removeMouseListener in interface P2DContainerInterfaceremoveMouseListener in class java.awt.Componentl - the mouse input listenerpublic FwkArrayInterface getFocusListenerArray()
getFocusListenerArray in interface P2DContainerInterfacepublic void addFocusListener(java.awt.event.FocusListener l)
addFocusListener in interface P2DContainerInterfaceaddFocusListener in class java.awt.Componentl - the focus listenerpublic void removeFocusListener(java.awt.event.FocusListener l)
removeFocusListener in interface P2DContainerInterfaceremoveFocusListener in class java.awt.Componentl - the focus listenerpublic FwkArrayInterface getRepaintListenerArray()
getRepaintListenerArray in interface P2DContainerInterfacepublic void addRepaintListener(P2DRepaintListenerInterface listener)
addRepaintListener in interface P2DContainerInterfacelistener - the repaint listener.public void removeRepaintListener(P2DRepaintListenerInterface listener)
removeRepaintListener in interface P2DContainerInterfacelistener - the repaint listener.public FwkArrayInterface getContainerListenerArray()
getContainerListenerArray in interface P2DContainerInterfacepublic void addContainerListener(P2DContainerListenerInterface listener)
addContainerListener in interface P2DContainerInterfacelistener - the container listener.public void removeContainerListener(P2DContainerListenerInterface listener)
removeContainerListener in interface P2DContainerInterfacelistener - the repaint listener.protected void fireContainerAddedEvent(P2DContainerInterface container)
container - that was added.protected void fireContainerRemovedEvent(P2DContainerInterface container)
container - that was removed.public FwkArrayInterface getOrderListenerArray()
getOrderListenerArray in interface P2DContainerInterfaceThe - BrickArrayInterface.public void addOrderListener(P2DOrderListenerInterface l)
addOrderListener in interface P2DContainerInterfacel - The order listener.public void removeOrderListener(P2DOrderListenerInterface l)
removeOrderListener in interface P2DContainerInterfacel - The order listener.public void fireOrderEvent(boolean flag)
fireOrderEvent in interface P2DContainerInterfaceflag - if true then an popToFront is fired else an pushToButton event.public FwkArrayInterface getListenerArray(java.lang.Class clazz)
getListenerArray in interface P2DContainerInterfaceclazz - The listener class.The - BrickArrayInterface.public java.util.EventListener[] getListeners(java.lang.Class clazz)
getListeners in class javax.swing.JComponentpublic void addListener(java.lang.Class clazz,
java.util.EventListener listener)
addListener in interface P2DContainerInterfaceclazz - The listener class.listener - An instance of the listener class.l - The order listener.public void removeListener(java.lang.Class clazz,
java.util.EventListener listener)
removeListener in interface P2DContainerInterfaceclazz - The listener class.listener - An instance of the listener class.l - The order listener.public void setSelectable(boolean flag)
setSelectable in interface P2DContainerInterfaceflag - if true the container is selectable.public boolean getSelectable()
getSelectable in interface P2DContainerInterfacepublic java.lang.Object readConstructor(org.w3c.dom.Document document,
org.w3c.dom.Element node)
readConstructor in interface FwkDOMHandlerInterfacereadConstructor in class FwkPaneldocument - The documnent Object Model.dtd - The dtd descriptor.node - The node.classProperties - Map the contains the writable object properties.
May be null.public void readFromDOM(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
readFromDOM in interface FwkDOMHandlerInterfacereadFromDOM in class FwkPanelpublic org.w3c.dom.Element writeConstructor(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
writeConstructor in interface FwkDOMHandlerInterfacewriteConstructor in class FwkPaneldocument - The documnent Object Model.dtd - The dtd descriptor.node - The node.classProperties - Map the contains the writable object properties.
May be null.public org.w3c.dom.Element writeToDOM(org.w3c.dom.Document document,
FwkXmlDtdInterface dtd,
org.w3c.dom.Node node,
java.util.Map classProperties)
writeToDOM in interface FwkDOMHandlerInterfacewriteToDOM in class FwkPaneldocument - The documnent Object Model.node - The parent node.classProperties - Map the contains the writable object properties.
May be null.public boolean writeToXML(java.lang.String filename,
boolean validate)
writeToXML in interface FwkDOMHandlerInterfacewriteToXML in class FwkPanelfilename - The name of the xml file.validate - Write a validated cml file.public boolean openPopupMenu(java.awt.event.MouseEvent ev)
openPopupMenu in interface P2DContainerInterfaceev - The mouse event.public java.lang.String getShortName()
getShortName in interface P2DContainerInterfacepublic void saveLastMouseEvent(java.awt.event.MouseEvent ev)
saveLastMouseEvent in interface P2DContainerInterfaceev - The mouse event to be saved.public java.awt.event.MouseEvent restoreLastMouseEvent()
restoreLastMouseEvent in interface P2DContainerInterfacepublic void saveLocalMousePoint(java.awt.geom.Point2D p)
saveLocalMousePoint in interface P2DContainerInterfacep - The local mouse point to be saved.public java.awt.geom.Point2D restoreLocalMousePoint()
restoreLocalMousePoint in interface P2DContainerInterfacepublic FwkCommandInterface[] getComponentCommands()
getComponentCommands in interface P2DContainerInterface