| java.lang.Object com.sun.midp.chameleon.CLayer com.sun.midp.chameleon.layers.PopupLayer
All known Subclasses: javax.microedition.lcdui.DateEditor, com.sun.midp.chameleon.layers.ScrollablePopupLayer, com.sun.midp.chameleon.layers.PTILayer, com.sun.midp.chameleon.layers.InputModeLayer,
PopupLayer | public class PopupLayer extends CLayer (Code) | | A "Popup" layer is a special kind of layer which can
also have commands associated with it. When a popup
layer is added to a MIDPWindow, its commands (if it has any)
can be accessed through the soft button bar. If a popup layer
does have commands associated with it, any commands on the
current displayable/item are no longer accessible. If
the popup layer does not have its own commands, any
existing commands from the displayable/item remain.
NOTE: For now, a PopupLayer is also always visible,
that is isVisible() always returns true. To control the
visibility of a PopupLayer, you add it and remove it
from a MIDPWindow. IMPL_NOTE: determine if a relationship between
PopupLayer and MIDPWindow can allow non visible popup layers.
|
Constructor Summary | |
public | PopupLayer() Construct a new PopupLayer. | public | PopupLayer(Image bgImage, int bgColor) Construct a new PopupLayer, given a background image. | public | PopupLayer(Image[] bgImage, int bgColor) Construct a new PopupLayer, given a 9 pc background image. |
Method Summary | |
public CommandListener | getCommandListener() Get the CommandListener associated with this popup layer. | public Command[] | getCommands() | public boolean | handlePoint(int x, int y) Returns true for popup layer because almost all pointer events
have to be handled by popup even if it's out of bounds. | public void | setCommandListener(CommandListener listener) Establish a listener for the commands for this popup layer. | public void | setCommands(Command[] commands) Set the set of Commands associated with this PopupLayer.
Parameters: commands - the set of Commands associated with thisPopupLayer. | public void | setVisible(boolean visible) The setVisible() method is overridden in PopupLayer
so as not to have any effect. |
commands | protected Command[] commands(Code) | | The set of Commands for this PopupLayer
|
listener | protected CommandListener listener(Code) | | The CommandListener to notify when a Command is selected
|
PopupLayer | public PopupLayer()(Code) | | Construct a new PopupLayer. By default, setSupportsInput()
is set to true.
|
PopupLayer | public PopupLayer(Image bgImage, int bgColor)(Code) | | Construct a new PopupLayer, given a background image.
By default, setSupportsInput() is set to true, and so
is setVisible().
|
PopupLayer | public PopupLayer(Image[] bgImage, int bgColor)(Code) | | Construct a new PopupLayer, given a 9 pc background image.
By default, setSupportsInput() is set to true, and so
is setVisible().
|
getCommandListener | public CommandListener getCommandListener()(Code) | | Get the CommandListener associated with this popup layer.
If the listener is null, any commands added to this popup layer
will not be visible when this popup is added to a MIDPWindow.
the CommandListener (if any) associated with this popup |
getCommands | public Command[] getCommands()(Code) | | Get the set of Commands associated with this PopupLayer
the set of Commands associated with this PopupLayer.'null' means there are no Commands. |
handlePoint | public boolean handlePoint(int x, int y)(Code) | | Returns true for popup layer because almost all pointer events
have to be handled by popup even if it's out of bounds. The most of
popups has to be closed if the pointer event is out of its bounds.
The exception is the pointer is a part of the command layer.
Parameters: x - the "x" coordinate of the point Parameters: y - the "y" coordinate of the point true if the point is handled by this layer |
setCommandListener | public void setCommandListener(CommandListener listener)(Code) | | Establish a listener for the commands for this popup layer.
NOTE: When the CommandListener is notified of a command action,
the 'displayable' argument in its commandAction() method will
always be null.
Parameters: listener - the CommandListener to call when a command onthis popup layer is selected |
setCommands | public void setCommands(Command[] commands)(Code) | | Set the set of Commands associated with this PopupLayer.
Parameters: commands - the set of Commands associated with thisPopupLayer. 'null' means there are no Commands |
setVisible | public void setVisible(boolean visible)(Code) | | The setVisible() method is overridden in PopupLayer
so as not to have any effect. PopupLayers are always
visible by their very nature. In order to hide a
PopupLayer, it should be removed from its containing
MIDPWindow.
|
Methods inherited from com.sun.midp.chameleon.CLayer | public void addDirtyRegion()(Code)(Java Doc) public boolean addDirtyRegion(int x, int y, int w, int h)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) protected void cleanDirty()(Code)(Java Doc) protected void cleanDirtyRegions()(Code)(Java Doc) public boolean containsPoint(int x, int y)(Code)(Java Doc) public int[] getBounds()(Code)(Java Doc) public boolean handlePoint(int x, int y)(Code)(Java Doc) protected void initialize()(Code)(Java Doc) public boolean isDirty()(Code)(Java Doc) protected boolean isEmptyDirtyRegions()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public boolean keyInput(int type, int code)(Code)(Java Doc) protected String layerID()(Code)(Java Doc) public boolean methodInput(String str)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) protected void paintBackground(Graphics g)(Code)(Java Doc) protected void paintBody(Graphics g)(Code)(Java Doc) public boolean pointerInput(int type, int x, int y)(Code)(Java Doc) public void relocateNotify(int[] oldBounds)(Code)(Java Doc) public void removeNotify(CWindow owner)(Code)(Java Doc) public void requestRepaint()(Code)(Java Doc) public void requestRepaint(int x, int y, int w, int h)(Code)(Java Doc) public void setBackground(Image bgImage, boolean tileBG, int bgColor)(Code)(Java Doc) public void setBackground(Image[] bgImages, int bgColor)(Code)(Java Doc) public void setBounds(int x, int y, int w, int h)(Code)(Java Doc) protected void setDirty()(Code)(Java Doc) protected void setDirtyButNotNotifyOwner()(Code)(Java Doc) public void setOpaque(boolean opaque)(Code)(Java Doc) public void setSupportsInput(boolean support)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public boolean supportsInput()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void update(CLayer[] mainLayers)(Code)(Java Doc)
|
|
|