Class ALcyDrawingToolBarFactory<S extends ILcdView & ILcdTreeLayered,T extends ILcdLayer>

java.lang.Object
com.luciad.lucy.gui.ALcyGUIFactory<Component>
com.luciad.lucy.addons.drawing.gui.ALcyDrawingToolBarFactory<S,T>
Type Parameters:
S - The type of the view used in the map component for which this factory creates a drawing toolbar (ILcdGXYView for GXY and ILspView for Lightspeed)
T - The type of the layers contained in the view of the map component ( ILcdGXYLayer for GXY and ILspLayer for Lightspeed)
Direct Known Subclasses:
TLcyDrawingToolBarFactory, TLcyLspDrawingToolBarFactory

public abstract class ALcyDrawingToolBarFactory<S extends ILcdView & ILcdTreeLayered,T extends ILcdLayer> extends ALcyGUIFactory<Component>

Abstract base class to create the default tool bar for editing a drawing model. It has concrete subclasses for a GXY and a Lightspeed view. It is recommended to extend one of those subclasses directly and not extend from this class.

The tool bar is constructed in the same manner a GUI panel is constructed in an ALcyGUIFactory. The main create function createGUI first creates all actions and active settables, then all the components and finally all the panels. Then it calls createGUIContent, which will create the content of the tool bar using the created panels by calling ALcyGUIFactory.getPanel(int).

Each GUI element can be replaced by overriding the respective create* method to return a custom element for the respective GUI ID. For example, to change the functionality of the load action, override the createAction method to return a custom action for the LOAD_ACTION ID. All the default IDs are available as public static fields in this class.

Similarly, one can override the createGUIContent method to produce a customized layout for the GUI elements.

The default actions and active settables can be removed from the tool bar by removing them for the drawing config file.

Adding items to the tool bar can be achieved by overriding the createGUIContent method, retrieving the tool bar and inserting actions or components into it. If items needs to be added from for example another add-on, it might be convenient to use TLcyActionBarUtil with action bar id DRAWING_TOOL_BAR_ID.

Since:
2012.1
  • Field Details

    • DRAWING_TOOL_BAR_ID

      public static final String DRAWING_TOOL_BAR_ID
      The ID of the ILcyActionBar that is created by this factory. The context for this action bar is the map component to which this action bar belongs.
      See Also:
    • MAIN_PANEL

      public static final int MAIN_PANEL
      The only panel of the drawing toolbar containing all the default components, actions and active settables which are included in the drawing config file.
      See Also:
    • LOAD_ACTION

      public static final int LOAD_ACTION
      Loads an external file into Lucy as an editable layer.
      See Also:
    • SAVE_ACTION

      public static final int SAVE_ACTION
      Saves a drawing layer to disk.
      See Also:
    • LINE_COLOR_ACTION

      public static final int LINE_COLOR_ACTION
      Changes the line color of shapes.
      See Also:
    • FONT_ACTION

      public static final int FONT_ACTION
      Changes the font of text shapes.
      See Also:
    • INTERSECTION_ACTION

      public static final int INTERSECTION_ACTION
      Calculates the intersection point(s) between two or more shapes.
      See Also:
    • POLYGON_INTERSECTION_ACTION

      public static final int POLYGON_INTERSECTION_ACTION
      Calculates the intersection between two or more shapes. The following shapes are supported:
      • ILcdPoint
      • ILcdPolypoint
      • ILcdPolyline
      • ILcdPolygon
      • ILcdComplexPolygon
      • ILcdShapeList containing any of the supported shapes
      See Also:
    • POLYGON_UNION_ACTION

      public static final int POLYGON_UNION_ACTION
      Calculates the union between two or more shapes. The following shapes are supported:
      • ILcdPoint
      • ILcdPolypoint
      • ILcdPolyline
      • ILcdPolygon
      • ILcdComplexPolygon
      • ILcdShapeList containing any of the supported shapes
      See Also:
    • PERPENDICULAR_ACTION

      public static final int PERPENDICULAR_ACTION
      Makes two polylines, containing only two points, perpendicular to each other.
      See Also:
    • BUFFER_ACTION

      public static final int BUFFER_ACTION
      Converts a polyline into a buffer with a certain width.
      See Also:
    • BUFFER_3D_ACTION

      public static final int BUFFER_3D_ACTION
      Converts a polyline into a lonlatheightbuffer with a certain width and height.
      See Also:
    • POLYGON_DIFFERENCE_ACTION

      public static final int POLYGON_DIFFERENCE_ACTION
      Calculates the difference between two or more shapes. The following shapes are supported:
      • ILcdPoint
      • ILcdPolypoint
      • ILcdPolyline
      • ILcdPolygon
      • ILcdComplexPolygon
      • ILcdShapeList containing any of the supported shapes
      See Also:
    • POLYGON_INVERTED_DIFFERENCE_ACTION

      public static final int POLYGON_INVERTED_DIFFERENCE_ACTION
      Calculates the inverted difference between two or more shapes. The following shapes are supported:
      • ILcdPoint
      • ILcdPolypoint
      • ILcdPolyline
      • ILcdPolygon
      • ILcdComplexPolygon
      • ILcdShapeList containing any of the supported shapes
      See Also:
    • POLYGON_SYMMETRIC_DIFFERENCE_ACTION

      public static final int POLYGON_SYMMETRIC_DIFFERENCE_ACTION
      Calculates the symmetric difference between two or more shapes. The following shapes are supported:
      • ILcdPoint
      • ILcdPolypoint
      • ILcdPolyline
      • ILcdPolygon
      • ILcdComplexPolygon
      • ILcdShapeList containing any of the supported shapes
      See Also:
    • POLYGON_CONVEX_HULL_ACTION

      public static final int POLYGON_CONVEX_HULL_ACTION
      Calculates the convex hull of one or more shapes. The following shapes are supported:
      • ILcdPoint
      • ILcdPolypoint
      • ILcdPolyline
      • ILcdPolygon
      • ILcdComplexPolygon
      • ILcdShapeList containing any of the supported shapes
      See Also:
    • VARIABLE_BUFFER_3D_ACTION

      public static final int VARIABLE_BUFFER_3D_ACTION
      Converts a polyline into a lonlatheightvariablegeobuffer with a certain width and height.
      See Also:
    • PARALLEL_ACTION

      public static final int PARALLEL_ACTION
      Creates a polyline parallel at an existing polyline.
      See Also:
    • POINT_ACTION

      public static final int POINT_ACTION
      Adds a point at a certain distance from the beginning or the end of an existing polyline.
      See Also:
    • EXTRUDE_ACTION

      public static final int EXTRUDE_ACTION
      Converts an existing 2D shape into an extruded 3D version with a minimal and maximal altitude.
      See Also:
    • DOME_ACTION

      public static final int DOME_ACTION
      Converts an existing circle into a dome.
      See Also:
    • SPHERE_ACTION

      public static final int SPHERE_ACTION
      Converts an existing circle into a sphere.
      See Also:
    • DELETE_ACTION

      public static final int DELETE_ACTION
      Deletes all the selected shapes.
      See Also:
    • GROUP_ACTION

      public static final int GROUP_ACTION
      Groups the selected shapes, after which they are threaded as one.
      See Also:
    • UNGROUP_ACTION

      public static final int UNGROUP_ACTION
      Restores a group of shapes as individual objects.
      See Also:
    • DUPLICATE_ACTION

      public static final int DUPLICATE_ACTION
      Makes a copy of the selected objects, and pastes every copy in the layer of the original object.
      See Also:
    • NEW_LAYER_ACTION

      public static final int NEW_LAYER_ACTION
      Adds an extra drawing layer to the map.
      See Also:
    • TRANSLATE_ACTION

      public static final int TRANSLATE_ACTION
      Translates the selected shapes over a certain distance and azimuth.
      See Also:
    • COPY_STYLE_ACTION

      public static final int COPY_STYLE_ACTION
      Copies the style of an object to other objects
      See Also:
    • UNEXTRUDE_ACTION

      public static final int UNEXTRUDE_ACTION
      Converts an extruded 3D shape into its base shape.
      See Also:
    • CHANGE_LINE_SIZE_ACTION

      public static final int CHANGE_LINE_SIZE_ACTION
      Changes the line size of a shape.
      Since:
      2016.0
      See Also:
    • CHANGE_LINE_STYLE_ACTION

      public static final int CHANGE_LINE_STYLE_ACTION
      Changes the line style of a shape. For example from a solid line to a dotted one.
      Since:
      2016.0
      See Also:
    • CHANGE_ARROW_STYLE_ACTION

      public static final int CHANGE_ARROW_STYLE_ACTION
      Adds or removes arrows at the beginning and/or end of lines.
      Since:
      2016.0
      See Also:
    • CHANGE_POINT_STYLE_ACTION

      public static final int CHANGE_POINT_STYLE_ACTION
      Changes the icon used to display points on the map
      Since:
      2016.0
      See Also:
    • CHANGE_FILL_COLOR_ACTION

      public static final int CHANGE_FILL_COLOR_ACTION
      Changes the fill color of a shape.
      Since:
      2016.0
      See Also:
    • LINE_SIZE_COMPONENT

      @Deprecated public static final int LINE_SIZE_COMPONENT
      Deprecated.
      The component is replaced by an action, which can be configured into any ILcyActionBar. See CHANGE_LINE_SIZE_ACTION and createAction(int, ALcyProperties)
      Changes the line size of a shape.
      See Also:
    • LINE_STYLE_COMPONENT

      @Deprecated public static final int LINE_STYLE_COMPONENT
      Deprecated.
      The component is replaced by an action, which can be configured into any ILcyActionBar. See CHANGE_LINE_STYLE_ACTION and createAction(int, ALcyProperties)
      Changes the line style of a shape. For example from a solid line to a dotted one.
      See Also:
    • ARROW_COMPONENT

      @Deprecated public static final int ARROW_COMPONENT
      Deprecated.
      The component is replaced by an action, which can be configured into any ILcyActionBar. See CHANGE_ARROW_STYLE_ACTION and createAction(int, ALcyProperties)
      Adds or removes arrows at the beginning and/or end of lines.
      See Also:
    • POINT_COMPONENT

      @Deprecated public static final int POINT_COMPONENT
      Deprecated.
      The component is replaced by an action, which can be configured into any ILcyActionBar. See CHANGE_POINT_STYLE_ACTION and createAction(int, ALcyProperties)
      Changes the icon used to display points on the map.
      See Also:
    • FILL_COLOR_COMPONENT

      @Deprecated public static final int FILL_COLOR_COMPONENT
      Deprecated.
      The component is replaced by an action, which can be configured into any ILcyActionBar. See CHANGE_FILL_COLOR_ACTION and createAction(int, ALcyProperties)
      Changes the fill color of a shape.
      See Also:
  • Constructor Details

    • ALcyDrawingToolBarFactory

      protected ALcyDrawingToolBarFactory(String aPropertyPrefix, ILcyLucyEnv aLucyEnv)

      Constructs a new drawing tool bar factory which will create all actions, active settables, components and panels which are specified in the class as static fields.

      Use the get*IDs methods if you want to modify the available IDs.

      Parameters:
      aPropertyPrefix - The prefix which will be used in the ALcyProperties instance passed to the createGUI method
      aLucyEnv - The Lucy back-end
  • Method Details