Package com.inet.html
Interface ViewPainter
- All Superinterfaces:
Cloneable
handles paint commands
-
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and Returns a copy of this object.default voidMarks a view as already painted.booleanhandles the paint, then returns whether to run the default painting or not.default voidreset()Resets the state of the painter to 'not yet painted'default voidsetAllocation(Rectangle allocation) An alternative way to store the allocation of the parent view without callingpaint(Graphics, Shape).default booleanReturns whether a view was already painted and thus should not be painted again.
-
Method Details
-
paint
handles the paint, then returns whether to run the default painting or not.
NOTE: is only meant to be called for "low-level" views without children.- Parameters:
g- graphicss- allocated shape to paint in- Returns:
- true if painting can continue, false if this view should not actually paint itself
- Since:
- 1.05
-
clone
Creates and Returns a copy of this object.- Returns:
- a copy of this object
- Throws:
CloneNotSupportedException- Thrown if clone() is not supported by the implementation- Since:
- 1.05
-
wasPainted
default boolean wasPainted()Returns whether a view was already painted and thus should not be painted again. This call does not affect the 'painted' state aspaint(Graphics, Shape)does.- Returns:
trueif painted,falseif not yet painted- Since:
- 1.12
-
setAllocation
An alternative way to store the allocation of the parent view without callingpaint(Graphics, Shape).- Parameters:
allocation- the allocation relative to the top left of the root view- Since:
- 1.12
-
markAsPainted
default void markAsPainted()Marks a view as already painted. Has the same effect as callingpaint(Graphics, Shape)with a clip where the view is visible.- Since:
- 1.12
-
reset
default void reset()Resets the state of the painter to 'not yet painted'- Since:
- 1.12
-