Java DTV API 1.3
18-Nov-2009

com.sun.dtv.lwuit.painter
Class PainterChain

java.lang.Object
  extended by com.sun.dtv.lwuit.painter.PainterChain
All Implemented Interfaces:
Painter

public class PainterChain
extends Object
implements 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
PainterChain(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
 PainterChain addPainter(Painter p)
          Creates a new chain based on the existing chain with the new element added at the end.
static void installGlassPane(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 painter.
 void paint(Graphics g, Rectangle rect)
          Draws inside the given rectangle clipping area.
 PainterChain prependPainter(Painter p)
          Creates a new chain based on the existing chain with the new element added at the beginning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PainterChain

public PainterChain(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.

Parameters:
chain - the chain elements
Method Detail

addPainter

public PainterChain addPainter(Painter p)
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

public PainterChain prependPainter(Painter p)
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

public void paint(Graphics g,
                  Rectangle rect)
Description copied from interface: Painter
Draws inside the given rectangle clipping area.

Specified by:
paint in interface Painter
Parameters:
g - the Graphics object
rect - the given rectangle clipping area

installGlassPane

public static void installGlassPane(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 painter.

Parameters:
f - form on which to install the chain
p - painter to install

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.