Interface IFigure
- All Known Subinterfaces:
Connection,FreeformFigure,IImageFigure,IScalablePane,IScrollableFigure,Orientable,RotatableDecoration,ScalableFigure
- All Known Implementing Classes:
AbstractImageFigure,AbstractPointListShape,ArrowButton,BlockFlow,Button,CheckBox,Clickable,ConnectionLayer,Container,Ellipse,Figure,FlowAdapter,FlowFigure,FlowPage,FreeformLayer,FreeformLayeredPane,FreeformViewport,GhostImageFigure,ImageFigure,InlineFlow,Label,LabeledContainer,Layer,LayeredPane,LightweightSystem.RootFigure,Panel,Polygon,PolygonDecoration,PolygonShape,Polyline,PolylineConnection,PolylineDecoration,PolylineShape,PuristicScrollPane,PuristicScrollPane.PuristicScrollBar,RectangleFigure,RoundedRectangle,ScalableFreeformLayeredPane,ScalableLayeredPane,ScalablePolygonShape,ScrollableThumbnail,ScrollBar,ScrollPane,Shape,TextFlow,Thumbnail,Toggle,ToggleButton,Triangle,Viewport
Graphics
object. Figures can be composed to create complex graphics.- @noimplement
- This interface is not intended to be implemented by clients. Use
Figure.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given IFigure as a child of this IFigure.voidAdds the given IFigure as a child of this IFigure at the given index.voidAdds the given IFigure as a child of this IFigure with the given constraint.voidAdds the child with the specified index and constraint.voidaddAncestorListener(AncestorListener listener) Registers the given listener as an AncestorListener of this figure.voidaddCoordinateListener(CoordinateListener listener) Registers the given listener as a CoordinateListener of this figure.voidaddFigureListener(FigureListener listener) Registers the given listener as a FigureListener of this figure.voidaddFocusListener(FocusListener listener) Registers the given listener as a FocusListener of this figure.voidaddKeyListener(KeyListener listener) Registers the given listener as a KeyListener of this figure.voidaddLayoutListener(LayoutListener listener) Registers the given listener on this figure.voidaddMouseListener(MouseListener listener) Registers the given listener as a MouseListener of this IFigure.voidaddMouseMotionListener(MouseMotionListener listener) Registers the given listener as a MouseMotionListener of this IFigure.voidaddMouseWheelListener(MouseWheelListener listener) Registers the given listener as a MouseWheelListener of this IFigure.voidCalled after this IFigure is added to its parent.voidRegisters the given listener as a PropertyChangeListener of this IFigure.voidaddPropertyChangeListener(String property, PropertyChangeListener listener) Registers the given listener as a PropertyChangeListener of this IFigure, interested only in the given property.booleancontainsPoint(int x, int y) Returnstrueif the point(x, y)is contained within this IFigure's bounds.booleanReturnstrueif the Point p is contained within this IFigure's bounds.voiderase()Erases this IFigure.findFigureAt(int x, int y) Returns the IFigure at the specified location.findFigureAt(int x, int y, TreeSearch search) Returns the IFigure at the specified location based on the conditional TreeSearch.Returns the IFigure at the specified location.findFigureAtExcluding(int x, int y, Collection<IFigure> collection) Returns the IFigure at the specified location, excluding any IFigures incollection.findMouseEventTargetAt(int x, int y) Returns the IFigure located at the given location which will accept mouse events.Returns the background color.Returns the current border by reference.Returns the smallest rectangle completely enclosing the IFigure.Returns an unmodifiable list of children by reference.Returns the rectangular area within this Figure's bounds in which children will be placed (viaLayoutManagers) and the painting of children will be clipped.getClientArea(Rectangle rect) Copies the client area into the specificied Recangle, and returns that rectangle for convenience.Returns the IClippingStrategy used by this figure to clip its childrenReturns the Cursor used when the mouse is over this IFigure.getFont()Returns the current Font by reference.Returns the foreground color.Returns the current Insets.Returns the current LayoutManager by reference.Returns the background Color of this Figure.Returns the local foreground Color of this Figure.default PointReturns the top-left corner of this Figure's bounds.Returns a hint indicating the largest desireable size for the IFigure.Returns a hint indicating the smallest desireable size for the IFigure.getMinimumSize(int wHint, int hHint) Returns a hint indicating the smallest desireable size for the IFigure.Returns the IFigure that is the current parent of this IFigure ornullif there is no parent.Returns the preferred size for this IFigure.getPreferredSize(int wHint, int hHint) Returns the preferred size for this IFigure using the provided width and height hints.getSize()Returns the current size.Returns a IFigure that is the tooltip for this IFigure.Returns the UpdateManager for this IFigure by reference.voidhandleFocusGained(FocusEvent event) Called when this IFigure has gained focus.voidhandleFocusLost(FocusEvent event) Called when this IFigure has lost focus.voidhandleKeyPressed(KeyEvent event) Called when a key is pressed while this IFigure has focus.voidhandleKeyReleased(KeyEvent event) Called when a key is released while this IFigure has focus.voidCalled when a mouse button has been double-clicked while within this IFigure's bounds.voidhandleMouseDragged(MouseEvent event) Called when the mouse has been dragged within this IFigure's bounds.voidhandleMouseEntered(MouseEvent event) Called when the mouse has entered this IFigure's bounds.voidhandleMouseExited(MouseEvent event) Called when the mouse has exited this IFigure's bounds.voidhandleMouseHover(MouseEvent event) Called when the mouse has hovered over this IFigure.voidhandleMouseMoved(MouseEvent event) Called when the mouse has moved within this IFigure's bounds.voidhandleMousePressed(MouseEvent event) Called when a mouse button has been pressed while within this IFigure's bounds.voidhandleMouseReleased(MouseEvent event) Called when a mouse button has been released while within this IFigure's bounds.voidCalled when a mouse wheel was scrolled while within this IFigure's bounds.booleanhasFocus()Returnstrueif this IFigure has focus.This method is for internal purposes only and should not be called.booleanintersects(Rectangle rect) Returnstrueif this IFigure's bounds intersect with the given Rectangle.voidInvalidates this IFigure.voidInvalidates this figure as well as all contained within.booleanReturnstrueif this figure is capable of applying a local coordinate system which affects its children.booleanReturnstrueif this IFigure is enabled.booleanReturnstrueif this IFigure can gain focus on aTraverseEvent.booleanbooleanisOpaque()Returnstrueif this IFigure is opaque.booleanReturnstrueif this IFigure can receive focus on a call torequestFocus().booleanReturnstrueif this IFigure is showing.booleanreturnstrueif this figure's visibility flag is set to true.voidPaints this IFigure and its children.voidRemoves the given child from this figure's children.voidremoveAncestorListener(AncestorListener listener) Unregisters the given listener, so that it will no longer receive notification of ancestor events.voidremoveCoordinateListener(CoordinateListener listener) Unregisters the given listener, so that it will no longer receive notification of coordinate changes.voidremoveFigureListener(FigureListener listener) Unregisters the given listener, so that it will no longer receive notification of IFigure events.voidremoveFocusListener(FocusListener listener) Unregisters the given listener, so that it will no longer receive notification of focus events.voidremoveKeyListener(KeyListener listener) Removes the first occurence of the given listener.voidremoveLayoutListener(LayoutListener listener) Removes the most recent occurence of the given listener.voidremoveMouseListener(MouseListener listener) Unregisters the given listener, so that it will no longer receive notification of mouse events.voidremoveMouseMotionListener(MouseMotionListener listener) Unregisters the given listener, so that it will no longer receive notification of mouse motion events.voidremoveMouseWheelListener(MouseWheelListener listener) Unregisters the given listener, so that it will no longer receive notification of mouse wheel events.voidCalled before this IFigure is removed from its parent.voidUnregisters the given listener, so that it will no longer receive notification of any property changes.voidremovePropertyChangeListener(String property, PropertyChangeListener listener) Unregisters the given listener, so that it will no longer receive notification of changes in the given property.voidrepaint()Repaints this IFigure.voidrepaint(int x, int y, int w, int h) Repaints the rectangular area within this IFigure whose upper-left corner is located at the point(x,y)and whose width and height arewandh, respectively.voidRepaints the rectangular area within this IFigure represented byrect.voidRequests focus from theEventDispatcher.voidInvalidates this figure and revalidates() its parent.voidSets the background color.voidSets the border.voidSets the bounds to the bounds of the specifiedRectangle.voidsetClippingStrategy(IClippingStrategy clippingStrategy) Registers a clipping strategy to specify how clipping is performed for child figures.voidsetConstraint(IFigure child, Object constraint) Convenience method to set the constraint of the specified child in the current LayoutManager.voidSets the cursor.voidsetEnabled(boolean value) Sets this IFigure to be enabled.voidsetFocusTraversable(boolean value) Sets the ability for this IFigure to gain focus on aTraverseEvent.voidSets the font.voidSets the foreground color.voidSets the LayoutManager.voidsetLocation(Point p) Sets the location of this IFigure.voidsetMaximumSize(Dimension size) Sets the maximum size this IFigure can be.voidsetMinimumSize(Dimension size) Sets the minimum size this IFigure can be.voidsetOpaque(boolean isOpaque) Sets this IFigure to be opaque if isOpaque istrueand transparent if isOpaque isfalse.voidSets this IFigure's parent.voidsetPreferredSize(Dimension size) Sets this IFigure's preferred size.voidsetRequestFocusEnabled(boolean requestFocusEnabled) Sets the ability for this Figure to gain focus on a call torequestFocus().voidsetSize(int w, int h) Sets this IFigure's size.voidSets this IFigure's size.voidsetToolTip(IFigure figure) Sets a tooltip that is displayed when the mouse hovers over this IFigure.voidsetVisible(boolean visible) Sets this IFigure's visibility.voidtranslate(int x, int y) Moves this IFigurexpixels horizontally andypixels vertically.voidTranslates a Translatable from this IFigure's parent's coordinates to this IFigure's local coordinates.voidTranslates a Translatable that is relative to this figure's bounds to absolute.voidTranslates a Translatable from this IFigure's coordinates to its parent's coordinates.voidTranslates a Translatable in absolute coordinates to be relative to this figure's bounds.voidvalidate()Indicates that this figure should make itself valid.
-
Field Details
-
MAX_DIMENSION
The maximum allowable dimension. (Integer.MAX_VALUE,Integer.MAX_VALUE) -
MIN_DIMENSION
The minimum allowable dimension. (5,5) -
NO_INSETS
Empty Insets.
-
-
Method Details
-
add
Adds the given IFigure as a child of this IFigure. The same as callingadd(figure, null, -1).- Parameters:
figure- The IFigure to add
-
add
Adds the given IFigure as a child of this IFigure at the given index. The same as callingadd(figure, null, index).- Parameters:
figure- The IFigure to addindex- The index where the IFigure should be added
-
add
Adds the given IFigure as a child of this IFigure with the given constraint. The same as callingadd(figure, constraint, -1).- Parameters:
figure- The IFigure to addconstraint- The newly added IFigure's constraint
-
add
Adds the child with the specified index and constraint. The child's parent is currently not null, it is removed from that parent. If this figure has a LayoutManager, thenLayoutManager.setConstraint(IFigure, Object)shall be called on the layout.- Parameters:
figure- The IFigure to addconstraint- The newly added IFigure's constraintindex- The index where the IFigure should be added- Throws:
IndexOutOfBoundsException- if the index is out of rangeIllegalArgumentException- if adding the child creates a cycle
-
addAncestorListener
Registers the given listener as an AncestorListener of this figure.- Parameters:
listener- The listener to add
-
addCoordinateListener
Registers the given listener as a CoordinateListener of this figure.- Parameters:
listener- the listener to add- Since:
- 3.1
-
addFigureListener
Registers the given listener as a FigureListener of this figure.- Parameters:
listener- The listener to add
-
addFocusListener
Registers the given listener as a FocusListener of this figure.- Parameters:
listener- The listener to add
-
addKeyListener
Registers the given listener as a KeyListener of this figure.- Parameters:
listener- The listener to add
-
addLayoutListener
Registers the given listener on this figure.- Parameters:
listener- The listener to add- Since:
- 3.1
-
addMouseListener
Registers the given listener as a MouseListener of this IFigure.- Parameters:
listener- The listener to add
-
addMouseMotionListener
Registers the given listener as a MouseMotionListener of this IFigure.- Parameters:
listener- The listener to add
-
addMouseWheelListener
Registers the given listener as a MouseWheelListener of this IFigure.- Parameters:
listener- The listener to add- Since:
- 3.20
-
addNotify
void addNotify()Called after this IFigure is added to its parent. -
addPropertyChangeListener
Registers the given listener as a PropertyChangeListener of this IFigure.- Parameters:
listener- The listener to add
-
addPropertyChangeListener
Registers the given listener as a PropertyChangeListener of this IFigure, interested only in the given property.- Parameters:
property- The property the listener is interested inlistener- The listener to add
-
containsPoint
boolean containsPoint(int x, int y) Returnstrueif the point(x, y)is contained within this IFigure's bounds.- Parameters:
x- The X coordinatey- The Y coordinate- Returns:
trueif the point (x,y) is contained in this IFigure's bounds
-
containsPoint
Returnstrueif the Point p is contained within this IFigure's bounds.- Parameters:
p- The point- Returns:
trueif the Point p is contained within this IFigure's bounds
-
erase
void erase()Erases this IFigure. -
findFigureAt
Returns the IFigure at the specified location. May returnthisornull.- Parameters:
x- The X coordinatey- The Y coordinate- Returns:
- The IFigure at the specified location
-
findFigureAt
Returns the IFigure at the specified location based on the conditional TreeSearch. May returnthisornull- Parameters:
x- the X coordinatey- the Y coordinatesearch- the conditional TreeSearch- Returns:
- the IFigure at the specified location
-
findFigureAt
Returns the IFigure at the specified location. May returnthisornull.- Parameters:
p- The point- Returns:
- The IFigure at the specified location
-
findFigureAtExcluding
Returns the IFigure at the specified location, excluding any IFigures incollection. May returnthisornull.- Parameters:
x- The X coordinatey- The Y coordinatecollection- A collection of IFigures to be excluded- Returns:
- The IFigure at the specified location, excluding any IFigures in collection
-
findMouseEventTargetAt
Returns the IFigure located at the given location which will accept mouse events.- Parameters:
x- The X coordinatey- The Y coordinate- Returns:
- The IFigure located at the given location which will accept mouse events
-
getBackgroundColor
Color getBackgroundColor()Returns the background color. Background color can be inherited from the parent.- Returns:
- The background color
-
getBorder
Border getBorder()Returns the current border by reference.- Returns:
- The current border
-
getBounds
Rectangle getBounds()Returns the smallest rectangle completely enclosing the IFigure. Implementation may return the Rectangle by reference. For this reason, callers of this method must not modify the returned Rectangle. The Rectangle's values may change in the future.- Returns:
- This IFigure's bounds
-
getChildren
Returns an unmodifiable list of children by reference.- Returns:
- An unmodifiable list of children by reference
-
getClientArea
Rectangle getClientArea()Returns the rectangular area within this Figure's bounds in which children will be placed (viaLayoutManagers) and the painting of children will be clipped.- Returns:
- The client area
-
getClientArea
Copies the client area into the specificied Recangle, and returns that rectangle for convenience.- Parameters:
rect- The destination rectangle for the client area- Returns:
- The same instance that was passed in, modified to contain the client area
-
getClippingStrategy
IClippingStrategy getClippingStrategy()Returns the IClippingStrategy used by this figure to clip its children- Returns:
- the IClipppingStrategy used to clip this figure's children.
- Since:
- 3.6
-
getCursor
Cursor getCursor()Returns the Cursor used when the mouse is over this IFigure.- Returns:
- The Cursor used when the mouse is over this IFigure
-
getFont
Font getFont()Returns the current Font by reference.- Returns:
- The current Font
-
getForegroundColor
Color getForegroundColor()Returns the foreground color.- Returns:
- The foreground color
-
getInsets
Insets getInsets()Returns the current Insets. May be returned by reference. The returned value should not be modified.- Returns:
- The current Insets.
-
getLayoutManager
LayoutManager getLayoutManager()Returns the current LayoutManager by reference.- Returns:
- The current LayoutManager by reference
-
getLocalBackgroundColor
Color getLocalBackgroundColor()Returns the background Color of this Figure. Does not inherit this Color from the parent, may return null.- Returns:
- The local background Color
-
getLocalForegroundColor
Color getLocalForegroundColor()Returns the local foreground Color of this Figure. Does not inherit this Color from the parent, may return null.- Returns:
- The local foreground Color
-
getLocation
Returns the top-left corner of this Figure's bounds.- Returns:
- The top-left corner of this Figure's bounds
- Since:
- 3.14
-
getMaximumSize
Dimension getMaximumSize()Returns a hint indicating the largest desireable size for the IFigure. Returned Dimension is by value.- Returns:
- The maximum size
-
getMinimumSize
Dimension getMinimumSize()Returns a hint indicating the smallest desireable size for the IFigure. The returned dimension may be by reference, and it must not be modified by the caller.- Returns:
- The minimum size
-
getMinimumSize
Returns a hint indicating the smallest desireable size for the IFigure. The returned dimension may be by reference, and it must not be modified by the caller.- Parameters:
wHint- the width hinthHint- the height hint- Returns:
- The minimum size
-
getParent
IFigure getParent()Returns the IFigure that is the current parent of this IFigure ornullif there is no parent.- Returns:
nullor the parent figure
-
getPreferredSize
Dimension getPreferredSize()Returns the preferred size for this IFigure. The returned value must not be modified by the caller. If the figure has no preference, it returns its current size. The same as callinggetPreferredSize(-1, -1).- Returns:
- The preferred size
-
getPreferredSize
Returns the preferred size for this IFigure using the provided width and height hints. The returned dimension may be by reference, and it must not be modified by the caller. A value of-1indicates that there is no constraint in that direction.- Parameters:
wHint- a width hinthHint- a height hint- Returns:
- The preferred size
-
getSize
Dimension getSize()Returns the current size. Returned Dimension is by value.- Returns:
- The current size
-
getToolTip
IFigure getToolTip()Returns a IFigure that is the tooltip for this IFigure.- Returns:
- This IFigure's tooltip
-
getUpdateManager
UpdateManager getUpdateManager()Returns the UpdateManager for this IFigure by reference.- Returns:
- The update manager
-
handleFocusGained
Called when this IFigure has gained focus.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
FocusListenerwith this IFigure.- Parameters:
event- The focus event
-
handleFocusLost
Called when this IFigure has lost focus.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
FocusListenerwith this IFigure.- Parameters:
event- The focus event
-
handleKeyPressed
Called when a key is pressed while this IFigure has focus.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
KeyListenerwith this IFigure.- Parameters:
event- The key event
-
handleKeyReleased
Called when a key is released while this IFigure has focus.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
KeyListenerwith this IFigure.- Parameters:
event- The key event
-
handleMouseDoubleClicked
Called when a mouse button has been double-clicked while within this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseDragged
Called when the mouse has been dragged within this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseMotionListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseEntered
Called when the mouse has entered this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseMotionListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseExited
Called when the mouse has exited this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseMotionListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseHover
Called when the mouse has hovered over this IFigure.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseMotionListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseMoved
Called when the mouse has moved within this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseMotionListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMousePressed
Called when a mouse button has been pressed while within this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseReleased
Called when a mouse button has been released while within this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseListenerwith this IFigure.- Parameters:
event- The mouse event
-
handleMouseWheelScrolled
Called when a mouse wheel was scrolled while within this IFigure's bounds.NOTE: You should not override this method. If you are interested in receiving notification of this type of event, you should register a
MouseWheelListenerwith this IFigure.- Parameters:
event- The mouse event.- Since:
- 3.20
-
hasFocus
boolean hasFocus()Returnstrueif this IFigure has focus.- Returns:
trueif this IFigure has focus
-
internalGetEventDispatcher
EventDispatcher internalGetEventDispatcher()This method is for internal purposes only and should not be called.- Returns:
- The event dispatcher
-
intersects
Returnstrueif this IFigure's bounds intersect with the given Rectangle. Figure is asked so that non-rectangular IFigures can reduce the frequency of paints.- Parameters:
rect- The rectangle to check for intersection- Returns:
trueif this IFigure's bounds intersect with the given Rectangle
-
invalidate
void invalidate()Invalidates this IFigure. If this figure has a LayoutManager, thenLayoutManager.invalidate()should be called on that layout. -
invalidateTree
void invalidateTree()Invalidates this figure as well as all contained within. -
isCoordinateSystem
boolean isCoordinateSystem()Returnstrueif this figure is capable of applying a local coordinate system which affects its children.- Returns:
trueif this figure provides local coordinates to children- Since:
- 3.1
-
isEnabled
boolean isEnabled()Returnstrueif this IFigure is enabled.- Returns:
trueif this IFigure is enabled
-
isFocusTraversable
boolean isFocusTraversable()Returnstrueif this IFigure can gain focus on aTraverseEvent.- Returns:
trueif this IFigure can gain focus on a TraverseEvent
-
isMirrored
boolean isMirrored()- Returns:
trueif this figure is hosted in a Control that is mirrored- Since:
- 3.1
-
isOpaque
boolean isOpaque()Returnstrueif this IFigure is opaque.- Returns:
trueif this IFigure is opaque
-
isRequestFocusEnabled
boolean isRequestFocusEnabled()Returnstrueif this IFigure can receive focus on a call torequestFocus().- Returns:
trueif this IFigure can receive focus on a call to requestFocus()
-
isShowing
boolean isShowing()Returnstrueif this IFigure is showing. This figure is only showing if it is visible and its parent is showing, or it has no parent.- Returns:
trueif this IFigure is showing
-
isVisible
boolean isVisible()returnstrueif this figure's visibility flag is set to true. Does not walk up the parent chain.- Returns:
trueif the figure's visibility flag is set
-
paint
Paints this IFigure and its children.- Parameters:
graphics- The Graphics object used for painting
-
remove
Removes the given child from this figure's children. If this figure has a LayoutManager, thenLayoutManager.remove(IFigure)shall be called on that layout with the child.- Parameters:
figure- The IFigure to remove
-
removeAncestorListener
Unregisters the given listener, so that it will no longer receive notification of ancestor events.- Parameters:
listener- The listener to remove
-
removeCoordinateListener
Unregisters the given listener, so that it will no longer receive notification of coordinate changes.- Parameters:
listener- the listener to remove- Since:
- 3.1
-
removeFigureListener
Unregisters the given listener, so that it will no longer receive notification of IFigure events.- Parameters:
listener- The listener to remove
-
removeFocusListener
Unregisters the given listener, so that it will no longer receive notification of focus events.- Parameters:
listener- The listener to remove
-
removeKeyListener
Removes the first occurence of the given listener.- Parameters:
listener- The listener to remove
-
removeLayoutListener
Removes the most recent occurence of the given listener.- Parameters:
listener- the listener to remove- Since:
- 3.1
-
removeMouseListener
Unregisters the given listener, so that it will no longer receive notification of mouse events.- Parameters:
listener- The listener to remove
-
removeMouseMotionListener
Unregisters the given listener, so that it will no longer receive notification of mouse motion events.- Parameters:
listener- The listener to remove
-
removeMouseWheelListener
Unregisters the given listener, so that it will no longer receive notification of mouse wheel events.- Parameters:
listener- The listener to remove- Since:
- 3.20
-
removeNotify
void removeNotify()Called before this IFigure is removed from its parent. -
removePropertyChangeListener
Unregisters the given listener, so that it will no longer receive notification of any property changes.- Parameters:
listener- The listener to remove
-
removePropertyChangeListener
Unregisters the given listener, so that it will no longer receive notification of changes in the given property. This will only unregister the listener for the given property. If the listener is registered to listen to other properties, this will not affect the notification of the listener regarding those properties.- Parameters:
property- The property that the listener is no longer interested inlistener- The listener no longer interested in the property
-
repaint
void repaint()Repaints this IFigure. -
repaint
void repaint(int x, int y, int w, int h) Repaints the rectangular area within this IFigure whose upper-left corner is located at the point(x,y)and whose width and height arewandh, respectively.- Parameters:
x- The X coordinate of the area to repainty- The Y coordinate of the area to repaintw- The width of the area to repainth- The height of the area to repaint
-
repaint
Repaints the rectangular area within this IFigure represented byrect.- Parameters:
rect- The rectangular area to be repainted
-
requestFocus
void requestFocus()Requests focus from theEventDispatcher. -
revalidate
void revalidate()Invalidates this figure and revalidates() its parent. If a figure does not have a parent, it will request a validation from it UpdateManager. Calling this method does not guarantee that a repaint will occur. -
setBackgroundColor
Sets the background color.- Parameters:
c- The new background color
-
setBorder
Sets the border.- Parameters:
b- The new border
-
setBounds
Sets the bounds to the bounds of the specifiedRectangle.- Parameters:
rect- The new bounds
-
setClippingStrategy
Registers a clipping strategy to specify how clipping is performed for child figures.- Parameters:
clippingStrategy-- Since:
- 3.6
-
setConstraint
Convenience method to set the constraint of the specified child in the current LayoutManager.- Parameters:
child- The figure whose constraint is being setconstraint- the constraint- Throws:
IllegalArgumentException- if the child is not contained by this Figure
-
setCursor
Sets the cursor.- Parameters:
cursor- The new cursor
-
setEnabled
void setEnabled(boolean value) Sets this IFigure to be enabled.- Parameters:
value-trueif this IFigure should be enabled
-
setFocusTraversable
void setFocusTraversable(boolean value) Sets the ability for this IFigure to gain focus on aTraverseEvent.- Parameters:
value-trueif this IFigure should gain focus on a TraverseEvent
-
setFont
Sets the font.- Parameters:
f- The new font
-
setForegroundColor
Sets the foreground color.- Parameters:
c- The new foreground color
-
setLayoutManager
Sets the LayoutManager.- Parameters:
lm- The new layout manager
-
setLocation
Sets the location of this IFigure.- Parameters:
p- The new location
-
setMaximumSize
Sets the maximum size this IFigure can be.- Parameters:
size- The new maximum size
-
setMinimumSize
Sets the minimum size this IFigure can be.- Parameters:
size- The new minimum size
-
setOpaque
void setOpaque(boolean isOpaque) Sets this IFigure to be opaque if isOpaque istrueand transparent if isOpaque isfalse.- Parameters:
isOpaque-trueis this IFigure should be opaque
-
setParent
Sets this IFigure's parent.- Parameters:
parent- The new parent IFigure
-
setPreferredSize
Sets this IFigure's preferred size.- Parameters:
size- The new preferred size
-
setRequestFocusEnabled
void setRequestFocusEnabled(boolean requestFocusEnabled) Sets the ability for this Figure to gain focus on a call torequestFocus().- Parameters:
requestFocusEnabled-trueif this IFigure should gain focus on a call to requestFocus()
-
setSize
Sets this IFigure's size.- Parameters:
d- The new size
-
setSize
void setSize(int w, int h) Sets this IFigure's size.- Parameters:
w- The new widthh- The new height
-
setToolTip
Sets a tooltip that is displayed when the mouse hovers over this IFigure.- Parameters:
figure- The tooltip IFigure
-
setVisible
void setVisible(boolean visible) Sets this IFigure's visibility.- Parameters:
visible-trueif this IFigure should be visible
-
translate
void translate(int x, int y) Moves this IFigurexpixels horizontally andypixels vertically.- Parameters:
x- The amount to move this IFigure horizontallyy- The amount to move this IFigure vertically
-
translateFromParent
Translates a Translatable from this IFigure's parent's coordinates to this IFigure's local coordinates.- Parameters:
t- The object to translate
-
translateToAbsolute
Translates a Translatable that is relative to this figure's bounds to absolute.- Parameters:
t- The object to translate
-
translateToParent
Translates a Translatable from this IFigure's coordinates to its parent's coordinates.- Parameters:
t- The object to translate
-
translateToRelative
Translates a Translatable in absolute coordinates to be relative to this figure's bounds.- Parameters:
t- The object to translate
-
validate
void validate()Indicates that this figure should make itself valid. Validation includes invoking layout on a LayoutManager if present, and then validating all children figures. Default validation uses pre-order, depth-first ordering.
-