Class RMEditorShapes

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable

    public class RMEditorShapes
    extends RMObject
    Handles editor methods specific to clipboard operations (cut, copy paste).
    • Constructor Summary

      Constructors 
      Constructor Description
      RMEditorShapes()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addCrossTab​(RMEditor anEditor)
      Adds a crosstab to the given editor.
      static void addGraph​(RMEditor anEditor)
      Adds a graph to the given editor.
      static void addImagePlaceholder​(RMEditor anEditor)
      Adds an image placeholder to the given editor.
      static void addLabels​(RMEditor anEditor)
      Adds a labels template to the given editor.
      static void addTable​(RMEditor anEditor)
      Adds a table to the given editor.
      static void bringToFront​(RMEditor anEditor)
      Orders all currently selected shapes to the front.
      static void combinePaths​(RMEditor anEditor)
      Create new shape by coalescing the outer perimeters of the currently selected shapes.
      static void convertToImage​(RMEditor anEditor)
      Converts currently selected shape to image.
      static void equallySpaceColumn​(RMEditor anEditor)
      Arranges currently selected shapes such that they have the same vertical distance between them.
      static void equallySpaceRow​(RMEditor anEditor)
      Arranges currently selected shapes such that they have the same horizontal distance between them.
      static int getAlign​(RMEditor anEditor)
      Returns the horizontal alignment of the text of the currently selected shapes.
      static float getCharSpacing​(RMEditor anEditor)
      Returns the characters spacing for the currently selected shape.
      static RMFont getFont​(RMEditor anEditor)
      Returns the font of editor's selected shape.
      static RMFormat getFormat​(RMEditor anEditor)
      Returns the format of the editor's selected shape.
      static float getLineGap​(RMEditor anEditor)
      Returns the line gap at char 0 (or selected char, if editing).
      static float getLineHeightMax​(RMEditor anEditor)
      Returns the maximum line height at char 0 (or selected char, if editing).
      static float getLineHeightMin​(RMEditor anEditor)
      Returns the minimum line height at char 0 (or selected char, if editing).
      static float getLineSpacing​(RMEditor anEditor)
      Returns the line spacing at char 0 (or selected char, if editing).
      static RMXString.Outline getOutline​(RMEditor anEditor)
      Returns the outline state of the currently selected shape (null if none).
      static RMColor getSelectedColor​(RMEditor anEditor)
      Returns the specified type of color (text, stroke or fill) of editor's selected shape.
      static void groupInScene3D​(RMEditor anEditor)
      Adds the selected shapes to a Scene3D Shape.
      static void groupInSwitchShape​(RMEditor anEditor)
      Adds the selected shapes to a Switch Shape.
      static void groupShapes​(RMEditor editor)
      Creates a group shape, adds the group shape to the worldShape and adds the selected shapes to the group shape.
      static void groupShapes​(RMEditor anEditor, java.util.List shapes, RMShape groupShape)
      Groups the given shape list to the given group shape.
      static boolean isUnderlined​(RMEditor anEditor)
      Returns whether the currently selected shape is underlined.
      static void makeBold​(RMEditor anEditor)
      Swaps the "boldness" of any text in the currently selected shapes.
      static void makeColumnCenter​(RMEditor anEditor)
      Arranges currently selected shapes in a column relative to their center.
      static void makeColumnLeft​(RMEditor anEditor)
      Arranges currently selected shapes in a column relative to their left border.
      static void makeColumnRight​(RMEditor anEditor)
      Arranges currently selected shapes in a column relative to their right border.
      static void makeItalic​(RMEditor anEditor)
      Swaps the "italicness" of any text in the currently selected shapes.
      static void makeRowBottom​(RMEditor anEditor)
      Arranges currently selected shapes in a row relative to their bottom.
      static void makeRowCenter​(RMEditor anEditor)
      Arranges currently selected shapes in a row relative to their center.
      static void makeRowTop​(RMEditor anEditor)
      Arranges currently selected shapes in a row relative to their top.
      static void makeSameHeight​(RMEditor anEditor)
      Makes currently selected shapes all have the same height as the first selected shape.
      static void makeSameSize​(RMEditor anEditor)
      Makes currently selected shapes all have the same width and height as the first selected shape.
      static void makeSameWidth​(RMEditor anEditor)
      Makes currently selected shapes all have the same width as the first selected shape.
      static void moveDownOnePoint​(RMEditor anEditor)
      Moves all the currently selected shapes one point down.
      static void moveLeftOnePoint​(RMEditor anEditor)
      Moves all the currently selected shapes one point to the left.
      static void moveRightOnePoint​(RMEditor anEditor)
      Moves all the currently selected shapes one point to the right.
      static void moveToNewLayer​(RMEditor anEditor)
      Moves all the currently selected shapes to a new page layer.
      static void moveUpOnePoint​(RMEditor anEditor)
      Moves all the currently selected shapes one point up.
      static void runListKeyPanel​(RMEditor anEditor, java.lang.String aKeyPath)
      Runs the list key panel to add a table, graph, crosstab or labels to given editor.
      static void sendToBack​(RMEditor anEditor)
      Orders all currently selected shapes to the back.
      static void setAlign​(RMEditor anEditor, int anAlign)
      Sets the horizontal alignment of the text of the currently selected shapes.
      static void setCharSpacing​(RMEditor anEditor, float aValue)
      Sets the character spacing for the currently selected shapes.
      static void setFont​(RMEditor anEditor, RMFont aFont)
      Sets the font of editor's selected shape(s).
      static void setFormat​(RMEditor anEditor, RMFormat aFormat)
      Sets the format of editor's selected shape(s).
      static void setLineGap​(RMEditor anEditor, float aHeight)
      Sets the line gap for all chars (or all selected chars, if editing).
      static void setLineHeightMax​(RMEditor anEditor, float aHeight)
      Sets the maximum line height for all chars (or all selected chars, if eiditing).
      static void setLineHeightMin​(RMEditor anEditor, float aHeight)
      Sets the minimum line height for all chars (or all selected chars, if editing).
      static void setLineSpacing​(RMEditor anEditor, float aHeight)
      Sets the line spacing for all chars (or all selected chars, if editing).
      static void setOutline​(RMEditor anEditor)
      Sets the currently selected shapes to be outlined.
      static void setOutline​(RMEditor anEditor, RMXString.Outline anOutline)
      Sets the outline state of the currently selected shapes.
      static void setSelectedColor​(RMEditor anEditor, RMColor aColor)
      Sets the specified type of color (text, stroke or fill) of editor's selected shape.
      static void setSizeToFit​(RMEditor anEditor)
      Makes currently selected shapes size to fit content.
      static void setSubscript​(RMEditor anEditor)
      Sets the currently selected shapes to show text as subscript.
      static void setSuperscript​(RMEditor anEditor)
      Sets the currently selected shapes to show text as superscript.
      static void setUnderlined​(RMEditor anEditor)
      Sets the currently selected shapes to be underlined.
      static void splitHorizontal​(RMEditor editor)
      Splits the selected shape in half on the horizontal axis.
      static void subtractPaths​(RMEditor anEditor)
      Create new shape by coalescing the outer perimeters of the currently selected shapes.
      static void ungroupShapes​(RMEditor anEditor)
      Ungroups any currently selected group shapes.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RMEditorShapes

        public RMEditorShapes()
    • Method Detail

      • groupShapes

        public static void groupShapes​(RMEditor editor)
        Creates a group shape, adds the group shape to the worldShape and adds the selected shapes to the group shape. The group shape is then made the only object in the selectedShapes array.
      • groupShapes

        public static void groupShapes​(RMEditor anEditor,
                                       java.util.List shapes,
                                       RMShape groupShape)
        Groups the given shape list to the given group shape.
      • ungroupShapes

        public static void ungroupShapes​(RMEditor anEditor)
        Ungroups any currently selected group shapes.
      • bringToFront

        public static void bringToFront​(RMEditor anEditor)
        Orders all currently selected shapes to the front.
      • sendToBack

        public static void sendToBack​(RMEditor anEditor)
        Orders all currently selected shapes to the back.
      • makeRowTop

        public static void makeRowTop​(RMEditor anEditor)
        Arranges currently selected shapes in a row relative to their top.
      • makeRowCenter

        public static void makeRowCenter​(RMEditor anEditor)
        Arranges currently selected shapes in a row relative to their center.
      • makeRowBottom

        public static void makeRowBottom​(RMEditor anEditor)
        Arranges currently selected shapes in a row relative to their bottom.
      • makeColumnLeft

        public static void makeColumnLeft​(RMEditor anEditor)
        Arranges currently selected shapes in a column relative to their left border.
      • makeColumnCenter

        public static void makeColumnCenter​(RMEditor anEditor)
        Arranges currently selected shapes in a column relative to their center.
      • makeColumnRight

        public static void makeColumnRight​(RMEditor anEditor)
        Arranges currently selected shapes in a column relative to their right border.
      • makeSameSize

        public static void makeSameSize​(RMEditor anEditor)
        Makes currently selected shapes all have the same width and height as the first selected shape.
      • makeSameWidth

        public static void makeSameWidth​(RMEditor anEditor)
        Makes currently selected shapes all have the same width as the first selected shape.
      • makeSameHeight

        public static void makeSameHeight​(RMEditor anEditor)
        Makes currently selected shapes all have the same height as the first selected shape.
      • setSizeToFit

        public static void setSizeToFit​(RMEditor anEditor)
        Makes currently selected shapes size to fit content.
      • equallySpaceRow

        public static void equallySpaceRow​(RMEditor anEditor)
        Arranges currently selected shapes such that they have the same horizontal distance between them.
      • equallySpaceColumn

        public static void equallySpaceColumn​(RMEditor anEditor)
        Arranges currently selected shapes such that they have the same vertical distance between them.
      • groupInSwitchShape

        public static void groupInSwitchShape​(RMEditor anEditor)
        Adds the selected shapes to a Switch Shape.
      • groupInScene3D

        public static void groupInScene3D​(RMEditor anEditor)
        Adds the selected shapes to a Scene3D Shape.
      • combinePaths

        public static void combinePaths​(RMEditor anEditor)
        Create new shape by coalescing the outer perimeters of the currently selected shapes.
      • subtractPaths

        public static void subtractPaths​(RMEditor anEditor)
        Create new shape by coalescing the outer perimeters of the currently selected shapes.
      • convertToImage

        public static void convertToImage​(RMEditor anEditor)
        Converts currently selected shape to image.
      • moveRightOnePoint

        public static void moveRightOnePoint​(RMEditor anEditor)
        Moves all the currently selected shapes one point to the right.
      • moveLeftOnePoint

        public static void moveLeftOnePoint​(RMEditor anEditor)
        Moves all the currently selected shapes one point to the left.
      • moveUpOnePoint

        public static void moveUpOnePoint​(RMEditor anEditor)
        Moves all the currently selected shapes one point up.
      • moveDownOnePoint

        public static void moveDownOnePoint​(RMEditor anEditor)
        Moves all the currently selected shapes one point down.
      • moveToNewLayer

        public static void moveToNewLayer​(RMEditor anEditor)
        Moves all the currently selected shapes to a new page layer.
      • getSelectedColor

        public static RMColor getSelectedColor​(RMEditor anEditor)
        Returns the specified type of color (text, stroke or fill) of editor's selected shape.
      • setSelectedColor

        public static void setSelectedColor​(RMEditor anEditor,
                                            RMColor aColor)
        Sets the specified type of color (text, stroke or fill) of editor's selected shape.
      • getFont

        public static RMFont getFont​(RMEditor anEditor)
        Returns the font of editor's selected shape.
      • setFont

        public static void setFont​(RMEditor anEditor,
                                   RMFont aFont)
        Sets the font of editor's selected shape(s).
      • makeBold

        public static void makeBold​(RMEditor anEditor)
        Swaps the "boldness" of any text in the currently selected shapes.
      • makeItalic

        public static void makeItalic​(RMEditor anEditor)
        Swaps the "italicness" of any text in the currently selected shapes.
      • isUnderlined

        public static boolean isUnderlined​(RMEditor anEditor)
        Returns whether the currently selected shape is underlined.
      • setUnderlined

        public static void setUnderlined​(RMEditor anEditor)
        Sets the currently selected shapes to be underlined.
      • getOutline

        public static RMXString.Outline getOutline​(RMEditor anEditor)
        Returns the outline state of the currently selected shape (null if none).
      • setOutline

        public static void setOutline​(RMEditor anEditor)
        Sets the currently selected shapes to be outlined.
      • setOutline

        public static void setOutline​(RMEditor anEditor,
                                      RMXString.Outline anOutline)
        Sets the outline state of the currently selected shapes.
      • getAlign

        public static int getAlign​(RMEditor anEditor)
        Returns the horizontal alignment of the text of the currently selected shapes.
      • setAlign

        public static void setAlign​(RMEditor anEditor,
                                    int anAlign)
        Sets the horizontal alignment of the text of the currently selected shapes.
      • setSuperscript

        public static void setSuperscript​(RMEditor anEditor)
        Sets the currently selected shapes to show text as superscript.
      • setSubscript

        public static void setSubscript​(RMEditor anEditor)
        Sets the currently selected shapes to show text as subscript.
      • getCharSpacing

        public static float getCharSpacing​(RMEditor anEditor)
        Returns the characters spacing for the currently selected shape.
      • setCharSpacing

        public static void setCharSpacing​(RMEditor anEditor,
                                          float aValue)
        Sets the character spacing for the currently selected shapes.
      • getLineSpacing

        public static float getLineSpacing​(RMEditor anEditor)
        Returns the line spacing at char 0 (or selected char, if editing).
      • setLineSpacing

        public static void setLineSpacing​(RMEditor anEditor,
                                          float aHeight)
        Sets the line spacing for all chars (or all selected chars, if editing).
      • getLineGap

        public static float getLineGap​(RMEditor anEditor)
        Returns the line gap at char 0 (or selected char, if editing).
      • setLineGap

        public static void setLineGap​(RMEditor anEditor,
                                      float aHeight)
        Sets the line gap for all chars (or all selected chars, if editing).
      • getLineHeightMin

        public static float getLineHeightMin​(RMEditor anEditor)
        Returns the minimum line height at char 0 (or selected char, if editing).
      • setLineHeightMin

        public static void setLineHeightMin​(RMEditor anEditor,
                                            float aHeight)
        Sets the minimum line height for all chars (or all selected chars, if editing).
      • getLineHeightMax

        public static float getLineHeightMax​(RMEditor anEditor)
        Returns the maximum line height at char 0 (or selected char, if editing).
      • setLineHeightMax

        public static void setLineHeightMax​(RMEditor anEditor,
                                            float aHeight)
        Sets the maximum line height for all chars (or all selected chars, if eiditing).
      • getFormat

        public static RMFormat getFormat​(RMEditor anEditor)
        Returns the format of the editor's selected shape.
      • setFormat

        public static void setFormat​(RMEditor anEditor,
                                     RMFormat aFormat)
        Sets the format of editor's selected shape(s).
      • splitHorizontal

        public static void splitHorizontal​(RMEditor editor)
        Splits the selected shape in half on the horizontal axis.
      • addTable

        public static void addTable​(RMEditor anEditor)
        Adds a table to the given editor.
      • addCrossTab

        public static void addCrossTab​(RMEditor anEditor)
        Adds a crosstab to the given editor.
      • addLabels

        public static void addLabels​(RMEditor anEditor)
        Adds a labels template to the given editor.
      • addGraph

        public static void addGraph​(RMEditor anEditor)
        Adds a graph to the given editor.
      • runListKeyPanel

        public static void runListKeyPanel​(RMEditor anEditor,
                                           java.lang.String aKeyPath)
        Runs the list key panel to add a table, graph, crosstab or labels to given editor.
      • addImagePlaceholder

        public static void addImagePlaceholder​(RMEditor anEditor)
        Adds an image placeholder to the given editor.