Documentation of 'org.jhotdraw.draw.DefaultDrawingEditor' Java class
DefaultDrawingEditor
org.jhotdraw.draw

Class DefaultDrawingEditor

    • Constructor Detail

      • DefaultDrawingEditor

        public DefaultDrawingEditor()
        Creates a new instance.
    • Method Detail

      • setTool

        public void setTool(Tool newValue)
        Description copied from interface: DrawingEditor
        Calls deactivate on the previously active tool of this drawing editor. Calls activate on the provided tool. Forwards all mouse, mouse moation and keyboard events that occur on the DrawingView to the provided tool.

        This is a bound property.

        Specified by:
        setTool in interface DrawingEditor
      • setActiveView

        public void setActiveView(DrawingView newValue)
        Description copied from interface: DrawingEditor
        Sets the editor's active drawing view. This can be set to null, if the editor has no views.
        Specified by:
        setActiveView in interface DrawingEditor
      • getDefaultAttribute

        public <T> T getDefaultAttribute(AttributeKey<T> key)
        Description copied from interface: DrawingEditor
        Gets a default attribute from the editor. The default attribute will be used by creation tools, to create a new figure.
        Specified by:
        getDefaultAttribute in interface DrawingEditor
      • setDefaultAttribute

        public void setDefaultAttribute(AttributeKey key,
                                        java.lang.Object newValue)
        Description copied from interface: DrawingEditor
        Sets a default attribute of the editor. The default attribute will be used by creation tools, to create a new figure.

        Fires a property change event with the name of the attribute key, and the prefix "defaultAttribute.".

        Specified by:
        setDefaultAttribute in interface DrawingEditor
      • remove

        public void remove(DrawingView view)
        Description copied from interface: DrawingEditor
        Removes a drawing view from the editor. The editor invokes removeNotify on the view, and it unregisters its tool on the view.
        Specified by:
        remove in interface DrawingEditor
      • add

        public void add(DrawingView view)
        Description copied from interface: DrawingEditor
        Adds a drawing view to the editor. The editor invokes addNotify on the view, and it registers its tool as an event listener on the view.
        Specified by:
        add in interface DrawingEditor
      • setCursor

        public void setCursor(java.awt.Cursor c)
        Description copied from interface: DrawingEditor
        Sets the cursor on the view(s) of the drawing editor.
        Specified by:
        setCursor in interface DrawingEditor
      • findView

        public DrawingView findView(java.awt.Container c)
        Description copied from interface: DrawingEditor
        Finds a drawing view. This is used by Tool to identify the view of which it has received an event.
        Specified by:
        findView in interface DrawingEditor
      • setEnabled

        public void setEnabled(boolean newValue)
        Description copied from interface: DrawingEditor
        Sets the enabled state of the drawing editor. This is a bound property.
        Specified by:
        setEnabled in interface DrawingEditor
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: DrawingEditor
        Gets the enabled state of the drawing editor.
        Specified by:
        isEnabled in interface DrawingEditor
      • setHandleAttribute

        public void setHandleAttribute(AttributeKey key,
                                       java.lang.Object value)
        Description copied from interface: DrawingEditor
        Sets a handle attribute of the editor. The default attribute will be used by creation tools, to create a new figure.
        Specified by:
        setHandleAttribute in interface DrawingEditor
        Parameters:
        key - AttributeKey.
        value - Attribute value.
      • getHandleAttribute

        public <T> T getHandleAttribute(AttributeKey<T> key)
        Description copied from interface: DrawingEditor
        Gets a handle attribute from the editor. The default attribute will be used by creation tools, to create a new figure.
        Specified by:
        getHandleAttribute in interface DrawingEditor
        Parameters:
        key - AttributeKey.
        Returns:
        If the handle attribute has been set, returns the previously set value. If the handle attribute has not been set, returns key.getDefaultValue().
      • setInputMap

        public void setInputMap(javax.swing.InputMap newValue)
        Description copied from interface: DrawingEditor
        Sets the input map used by the tool of this drawing editor as a fall back for handling keyboard events.

        This is a bound property.

        Specified by:
        setInputMap in interface DrawingEditor
      • getInputMap

        public javax.swing.InputMap getInputMap()
        Description copied from interface: DrawingEditor
        Sets the input map used by the tool of this drawing editor as a fall back for handling keyboard events.

        Tools use the input map of the drawing editor to determine what to do when a key was pressed that the tool can not handle.

        This is a bound property.

        Specified by:
        getInputMap in interface DrawingEditor
      • setActionMap

        public void setActionMap(javax.swing.ActionMap newValue)
        Description copied from interface: DrawingEditor
        Sets the action map used by the tool of this drawing editor as a fall back for performing actions.

        This is a bound property.

        Specified by:
        setActionMap in interface DrawingEditor
      • getActionMap

        public javax.swing.ActionMap getActionMap()
        Description copied from interface: DrawingEditor
        Gets the action map used by the tool of this drawing editor as a fall back for performing actions.

        Tools use the action map of the drawing editor to determine what to do when an action needs to be invoked from the InputMap of the drawing editor.

        This is a bound property.

        Specified by:
        getActionMap in interface DrawingEditor

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.