Documentation of 'org.jhotdraw.draw.handle.AbstractHandle' Java class
AbstractHandle
org.jhotdraw.draw.handle

Class AbstractHandle

    • Constructor Detail

      • AbstractHandle

        public AbstractHandle(Figure owner)
        Creates a new instance.
    • Method Detail

      • getOwner

        public Figure getOwner()
        Description copied from interface: Handle
        Returns the owner of this handle.
        Specified by:
        getOwner in interface Handle
      • draw

        public void draw(java.awt.Graphics2D g)
        Draws this handle.
        Specified by:
        draw in interface Handle
      • contains

        public boolean contains(java.awt.Point p)
        Description copied from interface: Handle
        Tests if a point is contained in the handle.
        Specified by:
        contains in interface Handle
      • invalidate

        public void invalidate()
        Description copied from interface: Handle
        Invalidates the handle. This method informs its listeners that its current display box is invalid and should be refreshed.
        Specified by:
        invalidate in interface Handle
      • dispose

        public void dispose()
        Description copied from interface: Handle
        Disposes the resources aquired by the handler.
        Specified by:
        dispose in interface Handle
      • areaInvalidated

        public void areaInvalidated(FigureEvent evt)
        Sent when a region used by the figure needs to be repainted. The implementation of this method assumes that the handle is located on the bounds of the figure or inside the figure. If the handle is located elsewhere this method must be reimpleted by the subclass.
        Specified by:
        areaInvalidated in interface FigureListener
      • getCursor

        public java.awt.Cursor getCursor()
        Returns a cursor for the handle.
        Specified by:
        getCursor in interface Handle
      • isCombinableWith

        public boolean isCombinableWith(Handle handle)
        Returns true, if the given handle is an instance of the same class or of a subclass of this handle,.
        Specified by:
        isCombinableWith in interface Handle
      • keyTyped

        public void keyTyped(java.awt.event.KeyEvent evt)
        Specified by:
        keyTyped in interface java.awt.event.KeyListener
      • keyReleased

        public void keyReleased(java.awt.event.KeyEvent evt)
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
      • keyPressed

        public void keyPressed(java.awt.event.KeyEvent evt)
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
      • getBounds

        public final java.awt.Rectangle getBounds()
        Description copied from interface: Handle
        Returns the bounding box of the handle. Note: The bounding box must be returned in the coordinate system of the DrawingView.
        Specified by:
        getBounds in interface Handle
      • getDrawingArea

        public java.awt.Rectangle getDrawingArea()
        Description copied from interface: Handle
        Returns the drawing area of the handle. Note: The drawing area must be returned in the coordinate system of the DrawingView.
        Specified by:
        getDrawingArea in interface Handle
      • trackDoubleClick

        public void trackDoubleClick(java.awt.Point p,
                                     int modifiersEx)
        Tracks a double click.
        Specified by:
        trackDoubleClick in interface Handle
      • viewTransformChanged

        public void viewTransformChanged()
        Description copied from interface: Handle
        This method is invoked by the drawing view, when its transform has changed. This means, that DrawingView.viewToDrawing and DrawingView.drawingToView will return different values than they did before.
        Specified by:
        viewTransformChanged in interface Handle
      • createSecondaryHandles

        public java.util.Collection<Handle> createSecondaryHandles()
        Description copied from interface: Handle
        Creates secondary handles.
        Specified by:
        createSecondaryHandles in interface Handle
      • getToolTipText

        public java.lang.String getToolTipText(java.awt.Point p)
        Returns a tooltip for the specified location. By default, AbstractHandle returns null.
        Specified by:
        getToolTipText in interface Handle
      • setToolTipText

        public void setToolTipText(java.lang.String newValue)
        Changes the default tool tip text returned by AbstractHandle.
      • figureHandlesChanged

        public void figureHandlesChanged(FigureEvent e)
        Description copied from interface: FigureListener
        Sent when handles of a Figure have been added, removed or replaced.

        DrawingViews listen to this event to repopulate the Handles.

        A Figure should not fire this event, if just the state or the location of Handle has changed.

        Specified by:
        figureHandlesChanged in interface FigureListener

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.