public class P2DCanvas extends FwkPanel implements P2DCanvasInterface, P2DRepaintListenerInterface, javax.swing.event.MouseInputListener, P2DOrderListenerInterface, FwkPrintableInterface
javax.swing.JPanel.AccessibleJPanel
javax.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, yalign
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
BOTTOM, CENTER, LEFT, RIGHT, TOP
INFOBUS_SOURCE
AUTHOR, 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, suspendPropertyChangeEvents
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, update
add, 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, validateTree
action, 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, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createImage
getTreeLock
add, getTitleName, refresh, setTitleName
getController, setController
getCompany, readingDOM, readingDOM
getPrintJobName, setPageFormat
fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, setProperty, setPropertyGroup, suspendChangeManager
getCommands, getPersistentObjectNames
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
getAuthor, 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, setSupportEMail
getTransferData, getTransferDataFlavors, isDataFlavorSupported
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getGroup, groupExists, removeCommand, removeFromGroup, setCommands
getPresentationString, getPresentationString
public 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()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class FwkPanel
public static FwkDescriptionInterface getDescriptor()
public void release()
release
in interface FwkInterface
release
in interface javax.infobus.DataItem
release
in class FwkPanel
public java.lang.String getTitle()
getTitle
in interface FwkDescriptionInterface
getTitle
in interface FwkPanelInterface
getTitle
in class FwkPanel
public void unregister()
unregister
in interface P2DContainerInterface
public java.lang.String toString()
toString
in class java.awt.Component
protected void init()
public void printPanel(java.awt.Graphics g)
printPanel
in interface FwkPanelInterface
printPanel
in class FwkPanel
g
- The graphical contents.protected void paintChildren(java.awt.Graphics g)
paintChildren
in class javax.swing.JComponent
paint(java.awt.Graphics)
,
Container.paint(java.awt.Graphics)
public void revalidate(boolean recursive)
revalidate
in interface P2DContainerInterface
public void removeNotify()
removeNotify
in class javax.swing.JComponent
public void setActiveComponent(P2DContainerInterface container, P2DContainerInterface component)
setActiveComponent
in interface P2DContainerInterface
component
- The component.public P2DContainerInterface getActiveComponent(P2DContainerInterface container)
getActiveComponent
in interface P2DContainerInterface
public boolean destroyController()
destroyController
in interface FwkControllerInterface
destroyController
in class FwkPanel
public void setAppearance(FwkAppearanceInterface ap)
ap
- The appearance.public FwkAppearanceInterface getAppearance()
public void setLineWidth(float w)
w
- The line width.BasicStroke
public float getLineWidth()
BasicStroke
public void setDashArray(float[] arr)
arr
- The segment array.BasicStroke
public float[] getDashArray()
BasicStroke
public void setDashPhase(float phase)
phase
- the dash phase.BasicStroke
public float getDashPhase()
BasicStroke
public void setEndCap(int cap)
BasicStroke
public int getEndCap()
BasicStroke
public void setLineJoin(int join)
join
- the line join style.BasicStroke
public int getLineJoin()
BasicStroke
public void setMiterLimit(float limit)
limit
- the limit.BasicStroke
public float getMiterLimit()
BasicStroke
public java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
getFont
in class java.awt.Component
public void setFont(java.awt.Font newFont)
setFont
in class javax.swing.JComponent
newFont
- 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.FwkException
Color
public java.awt.Color getColor() throws FwkException
FwkException
Color
public 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 yGraphics2D
public 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.Shape
public java.awt.Shape getClip()
Shape
public void setStroke(java.awt.Stroke s)
s
- The Stroke style.Stroke
public java.awt.Stroke getStroke()
Stroke
public void setFill(java.awt.Shape s)
s
- the filling shape.Shape
public java.awt.Shape getFill()
Shape
public boolean getVisible()
public void setVisible(boolean flag)
setVisible
in class javax.swing.JComponent
flag
- 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.Color
public java.awt.Color getBackgroundColor()
Color
public FwkArrayInterface getP2DComponents()
getP2DComponents
in interface P2DContainerInterface
public FwkArrayInterface getP2DComponentArray()
getP2DComponentArray
in interface P2DContainerInterface
public P2DContainerInterface addP2D(P2DContainerInterface comp)
addP2D
in interface P2DContainerInterface
comp
- the component to be added.public P2DContainerInterface addP2D(java.lang.String name, int index)
addP2D
in interface P2DContainerInterface
name
- the component's to be added.index
- the position at which to insert the component,
or -1
to insert the component at the end.comp
Container.remove(int)
,
#add(String)
public P2DContainerInterface addP2D(java.lang.String name)
addP2D
in interface P2DContainerInterface
name
- The component's name. The component is found on InfoBus.public P2DContainerInterface addP2D(P2DContainerInterface comp, int index)
addP2D
in interface P2DContainerInterface
comp
- the component to be added.index
- the position at which to insert the component,
or -1
to insert the component at the end.comp
Container.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 P2DContainerInterface
index
- the index of the component to be removed.Container.add(java.awt.Component)
public P2DContainerInterface removeP2D(P2DContainerInterface comp)
removeP2D
in interface P2DContainerInterface
comp
- the component to be removedContainer.add(java.awt.Component)
public P2DContainerInterface getP2D(int index)
index
,
from this container.getP2D
in interface P2DContainerInterface
index
- 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 P2DContainerInterface
comp
- 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 P2DContainerInterface
clazz
- 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 P2DContainerInterface
Container.add(java.awt.Component)
,
Container.remove(int)
public void toFront()
toFront
in interface P2DContainerInterface
public void toFront(int index)
toFront
in interface P2DContainerInterface
index
- The index of the component to be moved.public void toFront(P2DContainerInterface container)
toFront
in interface P2DContainerInterface
container
- The component to be moved.public void toBack()
toBack
in interface P2DContainerInterface
public void toBack(int index)
toBack
in interface P2DContainerInterface
index
- The index of the component to be moved.public void toBack(P2DContainerInterface container)
toBack
in interface P2DContainerInterface
container
- The component to be moved.public void setParentContainer(P2DContainerInterface container)
setParentContainer
in interface P2DContainerInterface
container
- The parent container.getParentContainer
public P2DContainerInterface getParentContainer()
getParentContainer
in interface P2DContainerInterface
setParentContainer
public void getAllArmedComponents(P2DContainerInterface container, java.awt.geom.Point2D p, FwkArrayInterface arr)
getAllArmedComponents
in interface P2DContainerInterface
p
- 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 P2DContainerInterface
x
- 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 P2DContainerInterface
public void processFocusEvent(java.awt.event.FocusEvent e)
processFocusEvent
in interface P2DContainerInterface
processFocusEvent
in class java.awt.Component
Component
public void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent
in interface P2DContainerInterface
processMouseEvent
in class javax.swing.JComponent
Component
public FwkCommandInterface[] getCommands()
getCommands
in interface FwkInstructionInterface
getCommands
in class FwkPanel
public P2DBoundingBoxInterface getBoundingBox()
getBoundingBox
in interface P2DCanvasInterface
public void setBoundingBox(P2DBoundingBoxInterface boundingBox)
the
- new scaling box.public void setPreferredSize(java.awt.Dimension size)
setPreferredSize
in class javax.swing.JComponent
size
- The preferred size.public void setSize(java.awt.Dimension size)
setSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
g
- The graphical context.public java.awt.Image getOffScreenImage()
getOffScreenImage
in interface P2DCanvasInterface
public void repaint()
repaint
in interface P2DContainerInterface
repaint
in interface P2DRepaintListenerInterface
repaint
in class java.awt.Component
public void setActive(P2DContainerInterface container, boolean flag)
setActive
in interface P2DContainerInterface
flag
- true if the component should be activated.public boolean getActive(P2DContainerInterface container)
getActive
in interface P2DContainerInterface
public void setBounds(int x, int y, int w, int h)
setBounds
in class java.awt.Component
dim
- the new dimension.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void popToFront(P2DOrderEventInterface event)
popToFront
in interface P2DOrderListenerInterface
event
- The order event.public void pushToBack(P2DOrderEventInterface event)
pushToBack
in interface P2DOrderListenerInterface
event
- The order event.public java.lang.String getMemberName()
getMemberName
in interface FwkInfoBusMemberInterface
setMemberName(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 FwkInfoBusMemberInterface
memberName
- The new name of the member.FwkException
public void joinInfoBus(java.lang.String infoBusName) throws FwkException
FwkException
public boolean isConnected()
isConnected
in interface FwkInfoBusMemberInterface
public java.lang.String getInfoBusName()
getInfoBusName
in interface FwkInfoBusMemberInterface
public void setInfoBusName(java.lang.String newName)
setInfoBusName
in interface FwkInfoBusMemberInterface
The
- new name of the infobus.public void addInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
addInfoBusPropertyListener
in interface javax.infobus.InfoBusMember
pcl
- The PropertyChangeListener.public void addInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
addInfoBusVetoableListener
in interface javax.infobus.InfoBusMember
vcl
- The VetoableChangeListener.public javax.infobus.InfoBus getInfoBus()
getInfoBus
in interface javax.infobus.InfoBusMember
public void removeInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
removeInfoBusPropertyListener
in interface javax.infobus.InfoBusMember
pcl
- The propertyChangeListener.public void removeInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
removeInfoBusVetoableListener
in interface javax.infobus.InfoBusMember
vcl
- The VetoableChangeListener.public void setInfoBus(javax.infobus.InfoBus newInfoBus) throws java.beans.PropertyVetoException
setInfoBus
in interface javax.infobus.InfoBusMember
The
- new infobus.java.beans.PropertyVetoException
public FwkArrayInterface getMouseMotionListenerArray()
getMouseMotionListenerArray
in interface P2DContainerInterface
public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
addMouseMotionListener
in interface P2DContainerInterface
addMouseMotionListener
in class java.awt.Component
l
- the mouse motion listenerpublic void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
removeMouseMotionListener
in interface P2DContainerInterface
removeMouseMotionListener
in class java.awt.Component
l
- the mouse motion listenerpublic FwkArrayInterface getMouseListenerArray()
getMouseListenerArray
in interface P2DContainerInterface
public void addMouseListener(java.awt.event.MouseListener l)
addMouseListener
in interface P2DContainerInterface
addMouseListener
in class java.awt.Component
l
- the mouse input listenerpublic void removeMouseListener(java.awt.event.MouseListener l)
removeMouseListener
in interface P2DContainerInterface
removeMouseListener
in class java.awt.Component
l
- the mouse input listenerpublic FwkArrayInterface getFocusListenerArray()
getFocusListenerArray
in interface P2DContainerInterface
public void addFocusListener(java.awt.event.FocusListener l)
addFocusListener
in interface P2DContainerInterface
addFocusListener
in class java.awt.Component
l
- the focus listenerpublic void removeFocusListener(java.awt.event.FocusListener l)
removeFocusListener
in interface P2DContainerInterface
removeFocusListener
in class java.awt.Component
l
- the focus listenerpublic FwkArrayInterface getRepaintListenerArray()
getRepaintListenerArray
in interface P2DContainerInterface
public void addRepaintListener(P2DRepaintListenerInterface listener)
addRepaintListener
in interface P2DContainerInterface
listener
- the repaint listener.public void removeRepaintListener(P2DRepaintListenerInterface listener)
removeRepaintListener
in interface P2DContainerInterface
listener
- the repaint listener.public FwkArrayInterface getContainerListenerArray()
getContainerListenerArray
in interface P2DContainerInterface
public void addContainerListener(P2DContainerListenerInterface listener)
addContainerListener
in interface P2DContainerInterface
listener
- the container listener.public void removeContainerListener(P2DContainerListenerInterface listener)
removeContainerListener
in interface P2DContainerInterface
listener
- 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 P2DContainerInterface
The
- BrickArrayInterface.public void addOrderListener(P2DOrderListenerInterface l)
addOrderListener
in interface P2DContainerInterface
l
- The order listener.public void removeOrderListener(P2DOrderListenerInterface l)
removeOrderListener
in interface P2DContainerInterface
l
- The order listener.public void fireOrderEvent(boolean flag)
fireOrderEvent
in interface P2DContainerInterface
flag
- if true then an popToFront is fired else an pushToButton event.public FwkArrayInterface getListenerArray(java.lang.Class clazz)
getListenerArray
in interface P2DContainerInterface
clazz
- The listener class.The
- BrickArrayInterface.public java.util.EventListener[] getListeners(java.lang.Class clazz)
getListeners
in class javax.swing.JComponent
public void addListener(java.lang.Class clazz, java.util.EventListener listener)
addListener
in interface P2DContainerInterface
clazz
- 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 P2DContainerInterface
clazz
- The listener class.listener
- An instance of the listener class.l
- The order listener.public void setSelectable(boolean flag)
setSelectable
in interface P2DContainerInterface
flag
- if true the container is selectable.public boolean getSelectable()
getSelectable
in interface P2DContainerInterface
public java.lang.Object readConstructor(org.w3c.dom.Document document, org.w3c.dom.Element node)
readConstructor
in interface FwkDOMHandlerInterface
readConstructor
in class FwkPanel
document
- 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 FwkDOMHandlerInterface
readFromDOM
in class FwkPanel
public org.w3c.dom.Element writeConstructor(org.w3c.dom.Document document, FwkXmlDtdInterface dtd, org.w3c.dom.Node node, java.util.Map classProperties)
writeConstructor
in interface FwkDOMHandlerInterface
writeConstructor
in class FwkPanel
document
- 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 FwkDOMHandlerInterface
writeToDOM
in class FwkPanel
document
- 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 FwkDOMHandlerInterface
writeToXML
in class FwkPanel
filename
- The name of the xml file.validate
- Write a validated cml file.public boolean openPopupMenu(java.awt.event.MouseEvent ev)
openPopupMenu
in interface P2DContainerInterface
ev
- The mouse event.public java.lang.String getShortName()
getShortName
in interface P2DContainerInterface
public void saveLastMouseEvent(java.awt.event.MouseEvent ev)
saveLastMouseEvent
in interface P2DContainerInterface
ev
- The mouse event to be saved.public java.awt.event.MouseEvent restoreLastMouseEvent()
restoreLastMouseEvent
in interface P2DContainerInterface
public void saveLocalMousePoint(java.awt.geom.Point2D p)
saveLocalMousePoint
in interface P2DContainerInterface
p
- The local mouse point to be saved.public java.awt.geom.Point2D restoreLocalMousePoint()
restoreLocalMousePoint
in interface P2DContainerInterface
public FwkCommandInterface[] getComponentCommands()
getComponentCommands
in interface P2DContainerInterface