Class PainterChain
java.lang.Object
com.codename1.ui.painter.PainterChain
- All Implemented Interfaces:
Painter
A painter chain allows us to chain together several painters to provide a
"layer" effect where each painter only draws one element.
-
Constructor Summary
ConstructorsConstructorDescriptionPainterChain(Painter painter) Create a new painter chain which will paint all of the elements in the chain in sequence from 0 to the last elementPainterChain(Painter[] chain) Create a new painter chain which will paint all of the elements in the chain in sequence from 0 to the last element -
Method Summary
Modifier and TypeMethodDescriptionCreates a new chain based on the existing chain with the new element added at the endPainter[]getChain()Allows us to traverse the painter chainstatic voidinstallGlassPane(Form f, Painter p) Installs a glass pane on the given form making sure to make it a painter chain only if required by existing paintervoidDraws inside the given rectangle clipping area.Creates a new chain based on the existing chain with the new element added at the beginningstatic voidremoveGlassPane(Form f, Painter p) Removes a glass pane from the given form, this is the opposite operation for the install glass paneMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PainterChain
Create a new painter chain which will paint all of the elements in the chain in sequence from 0 to the last element
Parameters
chain: the chain of components in the painter
-
PainterChain
Create a new painter chain which will paint all of the elements in the chain in sequence from 0 to the last element
Parameters
painter: the chain first Painter
-
-
Method Details
-
installGlassPane
-
removeGlassPane
-
addPainter
Creates a new chain based on the existing chain with the new element added at the end
Parameters
p: new painter
Returns
new chain element
-
prependPainter
Creates a new chain based on the existing chain with the new element added at the beginning
Parameters
p: new painter
Returns
new chain element
-
paint
-
getChain
Allows us to traverse the painter chain
Returns
the internal painter chain
-