Class RJShape

    • Constructor Detail

      • RJShape

        public RJShape()
        Creates a new RJShape.
      • RJShape

        public RJShape​(javax.swing.JComponent aComponent)
        Creates a new RJShape for the given component.
    • Method Detail

      • getComponent

        public javax.swing.JComponent getComponent()
        Returns the RJComponent represented by this shape.
      • setComponent

        public void setComponent​(javax.swing.JComponent aComponent)
        Sets the RJComponent represented by this shape.
      • getName

        public java.lang.String getName()
        Returns the shape's component's name.
        Overrides:
        getName in class RMShape
      • setName

        public void setName​(java.lang.String aName)
        Sets the shape's component's name.
        Overrides:
        setName in class RMShape
      • setX

        public void setX​(double aValue)
        Overrides shape implementation to propagate to component.
        Overrides:
        setX in class RMShape
      • setY

        public void setY​(double aValue)
        Overrides shape implementation to propagate to component.
        Overrides:
        setY in class RMShape
      • setWidth

        public void setWidth​(double aValue)
        Overrides shape implementation to propagate to component.
        Overrides:
        setWidth in class RMShape
      • setHeight

        public void setHeight​(double aValue)
        Overrides shape implementation to propagate to component.
        Overrides:
        setHeight in class RMShape
      • setFill

        public void setFill​(RMFill aFill)
        Overrides shape implementation to propagate to component.
        Overrides:
        setFill in class RMShape
      • getAutosizing

        public java.lang.String getAutosizing()
        Overrides shape implementation to propagate to component.
        Overrides:
        getAutosizing in class RMShape
      • setAutosizing

        public void setAutosizing​(java.lang.String aValue)
        Overrides shape implementation to propagate to component.
        Overrides:
        setAutosizing in class RMShape
      • getDefaultMinimumSize

        public RMSize getDefaultMinimumSize()
        Get the minimum/maximum size values from the component instead of the helper. If had been set previously, we'll get the last set value, otherwise it will return whatever the component's default is (on this L&F)
        Specified by:
        getDefaultMinimumSize in interface RJMinMaxSizeSettable
      • getDefaultMaximumSize

        public RMSize getDefaultMaximumSize()
        Get the minimum/maximum size values from the component instead of the helper. If had been set previously, we'll get the last set value, otherwise it will return whatever the component's default is (on this L&F)
        Specified by:
        getDefaultMaximumSize in interface RJMinMaxSizeSettable
      • getFont

        public RMFont getFont()
        Overrides shape implementation to propagate to component.
        Overrides:
        getFont in class RMShape
      • setFont

        public void setFont​(RMFont aFont)
        Overrides shape implementation to propagate to component.
        Overrides:
        setFont in class RMShape
      • getBorder

        public javax.swing.border.Border getBorder()
        Returns the Swing border for this shape.
      • setBorder

        public void setBorder​(javax.swing.border.Border aBorder)
        Sets the Swing border for this shape.
      • getToolTipText

        public java.lang.String getToolTipText()
        Returns the tool tip text associated with this shape's component.
      • setToolTipText

        public void setToolTipText​(java.lang.String aValue)
        Sets the tool tip text associated with this shape's component.
      • getChildRB

        public RJShape getChildRB​(int anIndex)
        Returns the individual child at the given index as an RJShape.
      • getBoundsInsideInset

        public RMRect getBoundsInsideInset()
        Returns the bounds of the shape in its own coordinate system, inset by the component's Insets, if it has any.
      • equals

        public boolean equals​(java.lang.Object anObj)
        Standard equals implementation.
        Overrides:
        equals in class RMShape
      • clone

        public java.lang.Object clone()
        Standard clone implementation.
        Overrides:
        clone in class RMShape
      • cloneDeep

        public RMShape cloneDeep()
        For clone deep, lets just archive and unarchive component, and get shape hieracrhy from it.
        Overrides:
        cloneDeep in class RMShape
      • getClipRect

        public RMRect getClipRect()
        Implemented by sublasses to specify clipping behavior. Null (the default) indicates no clipping. Any other rect is interpreted as being in the parent's coordinate system.
      • setClipsChildren

        public void setClipsChildren​(boolean flag)
        Any shape can be set to clip to its bbox by calling setClipsChildren(true).
      • getImage

        public java.awt.image.BufferedImage getImage()
        Returns the image for this shape.
      • recache

        public void recache()
        Resets the image represenation of this control to force it to recreate from component.
      • recacheDeep

        public void recacheDeep()
        Recache the entire shape tree (depth first).
      • paintImage

        public void paintImage​(java.awt.Graphics2D g)
        Paints the shape component image with the given graphics.
      • paintImageOverkill

        public void paintImageOverkill​(java.awt.Graphics2D g)
        Paints the shape component image into the given graphics in a manner more likely to always work.
      • getToolClassName

        public java.lang.String getToolClassName()
        Editor method - indicates that linked text should use normal text inspector.
        Overrides:
        getToolClassName in class RMShape
      • super_fromXML

        public java.lang.Object super_fromXML​(RXArchiver anArchiver,
                                              RXElement anElement)
        Provides access to RMShape fromXML implementation.
      • acceptsDrag

        public boolean acceptsDrag​(java.awt.dnd.DropTargetDragEvent dragEvent)
        Implemented by shapes that can handle drag & drop
      • dragAtPoint

        public void dragAtPoint​(java.awt.dnd.DropTargetDragEvent dragEvent,
                                RMPoint aPoint)
        Editor method - called by RBEditor when system does DnD over shape.
      • dropAtPoint

        public void dropAtPoint​(java.awt.dnd.DropTargetDropEvent dropEvent,
                                RMPoint aPoint)
        Editor method.
      • dropKeyAtPoint

        public void dropKeyAtPoint​(java.lang.String aKey,
                                   RMPoint aPoint)
        Editor method.
        Overrides:
        dropKeyAtPoint in class RMShape
      • dragExit

        public void dragExit()
        Editor method.
        Overrides:
        dragExit in class RMShape
      • findParentPanel

        public RJPanel findParentPanel()
        Walks up the shape hierarchy looking for the first ancestor of this shape which is an RJPanel.