Class JComponentShape
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.shape.RMShape
-
- com.inductiveautomation.rm.shape.RMParentShape
-
- com.inductiveautomation.rm.swing.shape.JComponentShape
-
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
- Direct Known Subclasses:
JComboBoxShape
,JListShape
,JMenuBarShape
,JPopupMenuShape
,JProgressBarShape
,JScrollPaneShape
,JSeparatorShape
,JSliderShape
,JSpinnerShape
,JSplitPaneShape
,JTabbedPaneShape
,JTableColumnShape
,JTableShape
,JTextComponentShape
,JTreeShape
,LabeledShape
,RJColorWellShape
,RJCustomViewShape
,RJThumbWheelShape
,SpringsPaneShape
,SwitchPaneShape
public class JComponentShape extends RMParentShape
A shape subclass for JComponent.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.rm.shape.RMShape
BINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
-
-
Constructor Summary
Constructors Constructor Description JComponentShape()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsMouse()
Overrides shape method to say we want events (to pass on to component).RMParentShape
clone()
Override to clear component.protected void
configureComponent(JBuilder aBldr, javax.swing.JComponent aComp)
Configures the component.protected javax.swing.JComponent
createComponent()
Creates the component.void
createComponentDeep(JBuilder aBldr, javax.swing.JComponent aComp)
Returns the component deep.protected void
dispatchEventToComponent(RMShapeMouseEvent anEvent, int anId)
Sends given event to shape component.protected void
firePropertyChange(java.beans.PropertyChangeEvent anEvent, java.lang.String aName, java.lang.Object oldVal, java.lang.Object newVal, int anIndex)
Override to clear component.protected void
fromXMLShape(RXArchiver anArchiver, RXElement anElement)
XML unarchival.java.lang.String
getAction()
Returns the action for this shape.java.lang.Boolean
getAutoscrolls()
Returns whether shape autoscrolls.RMColor
getBackground()
Returns background color.RMBorder
getBorder()
Returns the border.java.lang.Object
getClientProperty(java.lang.String aName)
Returns a named client property.javax.swing.JComponent
getComponent()
Returns the component.java.lang.Class<? extends javax.swing.JComponent>
getComponentClass()
Returns the component class for this component shape.RMFont
getFont()
Returns the font.RMColor
getForeground()
Returns foreground color.java.lang.String
getItemDisplayKey()
Returns the ItemDisplayKey.java.lang.String
getRealClassName()
Returns the substitution class name.java.lang.Boolean
getSendActionOnFocusLost()
Returns whether shape SendActionOnFocusLost.java.lang.String
getToolTipText()
Returns the tool tip text.boolean
isEnabled()
Whether shape is enabled.boolean
isFontSet()
Returns wether font has been set.java.lang.Boolean
isOpaque()
Returns whether shape is opaque.void
mouseClicked(RMShapeMouseEvent anEvent)
Handles mouse clicked events.void
mouseDragged(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.void
mouseEntered(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.void
mouseExited(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.void
mouseMoved(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.void
mousePressed(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.void
mouseReleased(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.void
paintShape(RMShapePainter aPntr)
Overrides paintShape to paint JComponentShapes with image from component.java.lang.Object
putClientProperty(java.lang.String aName, java.lang.Object aValue)
Puts a named client property.void
setAction(java.lang.String anAction)
Sets the action for this shape.void
setAutoscrolls(java.lang.Boolean aValue)
Sets whether shape autoscrolls.void
setBackground(RMColor aColor)
Sets the background color.void
setBorder(RMBorder aBorder)
Sets the border.void
setEnabled(boolean aValue)
Sets whether shape is enabled.void
setFont(RMFont aFont)
Sets the font.void
setForeground(RMColor aColor)
Sets the foreground color.void
setItemDisplayKey(java.lang.String aKey)
Sets the ItemDisplayKey.void
setOpaque(java.lang.Boolean aValue)
Sets whether shape is opaque.void
setRealClassName(java.lang.String aString)
Sets the substitution class string.void
setSendActionOnFocusLost(java.lang.Boolean aValue)
Sets whether shape Sends action on FocusLost.void
setToolTipText(java.lang.String aString)
Sets the tool tip text.protected void
toXMLChildren(RXArchiver anArchiver, RXElement anElement)
Override to archive RealClassName last.protected RXElement
toXMLShape(RXArchiver anArchiver)
XML archival.-
Methods inherited from class com.inductiveautomation.rm.shape.RMParentShape
addChild, addChild, addChild, addChild, addLayoutChild, bringShapesToFront, cloneDeep, computePrefHeight, computePrefWidth, divideShapeFromTop, fromXML, fromXMLChildren, getBoundsOfChildren, getChild, getChildArray, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWithClass, getChildrenWithClass, getChildWithClass, getChildWithName, getLayout, getNeedsLayout, getSourceURL, indexOfChild, isHittable, isShowing, isSourceURLSet, layout, layoutChildren, relayout, removeChild, removeChild, removeChildren, removeLayoutChild, rpgAll, rpgChildren, sendShapesToBack, setHeight, setLayout, setNeedsLayout, setSourceURL, setWidth, toXML
-
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChildAnimator, getChildAnimator, getChildClipShape, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDatasetKey, getDisplayedFill, getDisplayedStroke, getDocument, getEffect, getEventAdapter, getFill, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPath, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEditing, isEnabled, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgBindings, rpgShape, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
getAutoscrolls
public java.lang.Boolean getAutoscrolls()
Returns whether shape autoscrolls.
-
setAutoscrolls
public void setAutoscrolls(java.lang.Boolean aValue)
Sets whether shape autoscrolls.
-
getForeground
public RMColor getForeground()
Returns foreground color.
-
setForeground
public void setForeground(RMColor aColor)
Sets the foreground color.
-
getBackground
public RMColor getBackground()
Returns background color.
-
setBackground
public void setBackground(RMColor aColor)
Sets the background color.
-
isFontSet
public boolean isFontSet()
Returns wether font has been set.
-
getBorder
public RMBorder getBorder()
Returns the border.
-
setBorder
public void setBorder(RMBorder aBorder)
Sets the border.
-
isOpaque
public java.lang.Boolean isOpaque()
Returns whether shape is opaque.
-
setOpaque
public void setOpaque(java.lang.Boolean aValue)
Sets whether shape is opaque.
-
getToolTipText
public java.lang.String getToolTipText()
Returns the tool tip text.
-
setToolTipText
public void setToolTipText(java.lang.String aString)
Sets the tool tip text.
-
isEnabled
public boolean isEnabled()
Whether shape is enabled.
-
setEnabled
public void setEnabled(boolean aValue)
Sets whether shape is enabled.
-
getAction
public java.lang.String getAction()
Returns the action for this shape.
-
setAction
public void setAction(java.lang.String anAction)
Sets the action for this shape.
-
getSendActionOnFocusLost
public java.lang.Boolean getSendActionOnFocusLost()
Returns whether shape SendActionOnFocusLost.
-
setSendActionOnFocusLost
public void setSendActionOnFocusLost(java.lang.Boolean aValue)
Sets whether shape Sends action on FocusLost.
-
getItemDisplayKey
public java.lang.String getItemDisplayKey()
Returns the ItemDisplayKey.
-
setItemDisplayKey
public void setItemDisplayKey(java.lang.String aKey)
Sets the ItemDisplayKey.
-
getClientProperty
public java.lang.Object getClientProperty(java.lang.String aName)
Returns a named client property.
-
putClientProperty
public java.lang.Object putClientProperty(java.lang.String aName, java.lang.Object aValue)
Puts a named client property.
-
getRealClassName
public java.lang.String getRealClassName()
Returns the substitution class name.
-
setRealClassName
public void setRealClassName(java.lang.String aString)
Sets the substitution class string.
-
firePropertyChange
protected void firePropertyChange(java.beans.PropertyChangeEvent anEvent, java.lang.String aName, java.lang.Object oldVal, java.lang.Object newVal, int anIndex)
Override to clear component.- Overrides:
firePropertyChange
in classRMObject
-
acceptsMouse
public boolean acceptsMouse()
Overrides shape method to say we want events (to pass on to component).- Overrides:
acceptsMouse
in classRMShape
-
mousePressed
public void mousePressed(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.- Overrides:
mousePressed
in classRMShape
-
mouseDragged
public void mouseDragged(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.- Overrides:
mouseDragged
in classRMShape
-
mouseReleased
public void mouseReleased(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.- Overrides:
mouseReleased
in classRMShape
-
mouseClicked
public void mouseClicked(RMShapeMouseEvent anEvent)
Handles mouse clicked events.- Overrides:
mouseClicked
in classRMShape
-
mouseEntered
public void mouseEntered(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.- Overrides:
mouseEntered
in classRMShape
-
mouseMoved
public void mouseMoved(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.- Overrides:
mouseMoved
in classRMShape
-
mouseExited
public void mouseExited(RMShapeMouseEvent anEvent)
Overrides shape method to pass events on to component.- Overrides:
mouseExited
in classRMShape
-
dispatchEventToComponent
protected void dispatchEventToComponent(RMShapeMouseEvent anEvent, int anId)
Sends given event to shape component.
-
getComponent
public javax.swing.JComponent getComponent()
Returns the component.
-
createComponent
protected javax.swing.JComponent createComponent()
Creates the component.
-
getComponentClass
public java.lang.Class<? extends javax.swing.JComponent> getComponentClass()
Returns the component class for this component shape.
-
configureComponent
protected void configureComponent(JBuilder aBldr, javax.swing.JComponent aComp)
Configures the component.
-
createComponentDeep
public void createComponentDeep(JBuilder aBldr, javax.swing.JComponent aComp)
Returns the component deep.
-
paintShape
public void paintShape(RMShapePainter aPntr)
Overrides paintShape to paint JComponentShapes with image from component.- Overrides:
paintShape
in classRMShape
-
clone
public RMParentShape clone()
Override to clear component.- Overrides:
clone
in classRMParentShape
-
toXMLShape
protected RXElement toXMLShape(RXArchiver anArchiver)
XML archival.- Overrides:
toXMLShape
in classRMParentShape
-
toXMLChildren
protected void toXMLChildren(RXArchiver anArchiver, RXElement anElement)
Override to archive RealClassName last.- Overrides:
toXMLChildren
in classRMParentShape
-
fromXMLShape
protected void fromXMLShape(RXArchiver anArchiver, RXElement anElement)
XML unarchival.- Overrides:
fromXMLShape
in classRMParentShape
-
-