Class JComponentShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, 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.
  • Constructor Details

    • JComponentShape

      public JComponentShape()
  • Method Details

    • getAutoscrolls

      public Boolean getAutoscrolls()
      Returns whether shape autoscrolls.
    • setAutoscrolls

      public void setAutoscrolls(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.
      Overrides:
      isFontSet in class RMShape
    • getFont

      public RMFont getFont()
      Returns the font.
      Overrides:
      getFont in class RMShape
    • setFont

      public void setFont(RMFont aFont)
      Sets the font.
      Overrides:
      setFont in class RMShape
    • getBorder

      public RMBorder getBorder()
      Returns the border.
    • setBorder

      public void setBorder(RMBorder aBorder)
      Sets the border.
    • isOpaque

      public Boolean isOpaque()
      Returns whether shape is opaque.
    • setOpaque

      public void setOpaque(Boolean aValue)
      Sets whether shape is opaque.
    • getToolTipText

      public String getToolTipText()
      Returns the tool tip text.
    • setToolTipText

      public void setToolTipText(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 String getAction()
      Returns the action for this shape.
    • setAction

      public void setAction(String anAction)
      Sets the action for this shape.
    • getSendActionOnFocusLost

      public Boolean getSendActionOnFocusLost()
      Returns whether shape SendActionOnFocusLost.
    • setSendActionOnFocusLost

      public void setSendActionOnFocusLost(Boolean aValue)
      Sets whether shape Sends action on FocusLost.
    • getItemDisplayKey

      public String getItemDisplayKey()
      Returns the ItemDisplayKey.
    • setItemDisplayKey

      public void setItemDisplayKey(String aKey)
      Sets the ItemDisplayKey.
    • getClientProperty

      public Object getClientProperty(String aName)
      Returns a named client property.
    • putClientProperty

      public Object putClientProperty(String aName, Object aValue)
      Puts a named client property.
    • getRealClassName

      public String getRealClassName()
      Returns the substitution class name.
    • setRealClassName

      public void setRealClassName(String aString)
      Sets the substitution class string.
    • firePropertyChange

      protected void firePropertyChange(PropertyChangeEvent anEvent, String aName, Object oldVal, Object newVal, int anIndex)
      Override to clear component.
      Overrides:
      firePropertyChange in class RMObject
    • acceptsMouse

      public boolean acceptsMouse()
      Overrides shape method to say we want events (to pass on to component).
      Overrides:
      acceptsMouse in class RMShape
    • mousePressed

      public void mousePressed(RMShapeMouseEvent anEvent)
      Overrides shape method to pass events on to component.
      Overrides:
      mousePressed in class RMShape
    • mouseDragged

      public void mouseDragged(RMShapeMouseEvent anEvent)
      Overrides shape method to pass events on to component.
      Overrides:
      mouseDragged in class RMShape
    • mouseReleased

      public void mouseReleased(RMShapeMouseEvent anEvent)
      Overrides shape method to pass events on to component.
      Overrides:
      mouseReleased in class RMShape
    • mouseClicked

      public void mouseClicked(RMShapeMouseEvent anEvent)
      Handles mouse clicked events.
      Overrides:
      mouseClicked in class RMShape
    • mouseEntered

      public void mouseEntered(RMShapeMouseEvent anEvent)
      Overrides shape method to pass events on to component.
      Overrides:
      mouseEntered in class RMShape
    • mouseMoved

      public void mouseMoved(RMShapeMouseEvent anEvent)
      Overrides shape method to pass events on to component.
      Overrides:
      mouseMoved in class RMShape
    • mouseExited

      public void mouseExited(RMShapeMouseEvent anEvent)
      Overrides shape method to pass events on to component.
      Overrides:
      mouseExited in class RMShape
    • dispatchEventToComponent

      protected void dispatchEventToComponent(RMShapeMouseEvent anEvent, int anId)
      Sends given event to shape component.
    • getComponent

      public JComponent getComponent()
      Returns the component.
    • createComponent

      protected JComponent createComponent()
      Creates the component.
    • getComponentClass

      public Class<? extends JComponent> getComponentClass()
      Returns the component class for this component shape.
    • configureComponent

      protected void configureComponent(JBuilder aBldr, JComponent aComp)
      Configures the component.
    • createComponentDeep

      public void createComponentDeep(JBuilder aBldr, JComponent aComp)
      Returns the component deep.
    • paintShape

      public void paintShape(RMShapePainter aPntr)
      Overrides paintShape to paint JComponentShapes with image from component.
      Overrides:
      paintShape in class RMShape
    • clone

      public RMParentShape clone()
      Override to clear component.
      Overrides:
      clone in class RMParentShape
    • toXMLShape

      protected RXElement toXMLShape(RXArchiver anArchiver)
      XML archival.
      Overrides:
      toXMLShape in class RMParentShape
    • toXMLChildren

      protected void toXMLChildren(RXArchiver anArchiver, RXElement anElement)
      Override to archive RealClassName last.
      Overrides:
      toXMLChildren in class RMParentShape
    • fromXMLShape

      protected void fromXMLShape(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Overrides:
      fromXMLShape in class RMParentShape