|
Apime v1.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.java4ever.apime.ui.IComponent
Clase base para crear componentes.
| Field Summary | |
static int |
CURSOR_ENABLED_ALWAYS
Cursor activado siempre. |
static int |
CURSOR_ENABLED_NEVER
Cursor desactivado siempre. |
static int |
CURSOR_ENABLED_SWITCH
Cursor activado/desactivado cuando se pulsa sobre el componente. |
static Skin |
skin
Instancia global del skin. |
| Constructor Summary | |
protected |
IComponent()
Constructor. |
| Method Summary | |
boolean |
contains(int x,
int y)
Devuelve si las coordenadas relativas están dentro del componente. |
ActionListener |
getActionListener()
Devuelve el listener de acciones o 'null' si no tiene. |
int |
getBackground()
Devuelve el color de fondo. |
int |
getBorder()
Devuelve el color del borde. |
Rectangle |
getBounds()
Devuelve la posición y el tamaño del componente. |
ComponentListener |
getComponentListener()
Devuelve el listener de componente o 'null' si no tiene. |
Cursor |
getCursor()
Devuelve el cursor. |
int |
getCursorEnabled()
Devuelve el tipo de cursor. |
FocusListener |
getFocusListener()
Devuelve el listener de foco o 'null' si no tiene. |
IFont |
getFont()
Devuelve el tipo de letra. |
int |
getForeground()
Devuelve el color de primer plano. |
int |
getHeight()
Devuelve la altura del componente. |
KeyListener |
getKeyListener()
Devuelve el listener de teclado o 'null' si no tiene. |
Point |
getLocation()
Devuelve la posición del componente. |
Point |
getLocationOnScreen()
Devuelve la posición del componente en la pantalla. |
MouseListener |
getMouseListener()
Devuelve el listener de ratón o 'null' si no tiene. |
IContainer |
getParent()
Devuelve el contenedor padre o 'null' si no tiene. |
protected IContainer |
getRoot()
Devuelve el contenedor principal o 'null' si no está en pantalla. |
IScrollPane |
getScrollPane()
Devuelve el panel con scroll del componente. |
Point |
getSize()
Devuelve el tamaño del componente. |
int |
getSkinId()
Devuelve el Id del componente dentro del skin. |
java.lang.String |
getToolTip()
Devuelve el texto del tooltip o 'null' si no tiene. |
int |
getWidth()
Devuelve la anchura del componente. |
int |
getX()
Devuelve la coordenada X del componente. |
int |
getY()
Devuelve la coordenada Y del componente. |
boolean |
isEnabled()
Devuelve si el componente está activo. |
boolean |
isFocusOwner()
Devuelve si el componente tiene el foco. |
boolean |
isVisible()
Devuelve si el componente es visible. |
void |
paint(javax.microedition.lcdui.Graphics g)
Pinta el componente (background-paintComponent()-border). |
abstract void |
paintComponent(javax.microedition.lcdui.Graphics g)
Pinta el componente. |
protected void |
processActionEvent(java.lang.Object data)
Procesa un evento de acción. |
protected void |
processComponentEvent(int type)
Procesa un evento de componente. |
protected void |
processFocusEvent(int type)
Procesa un evento de foco. |
protected void |
processKeyEvent(int type,
int code,
int action,
char character)
Procesa un evento de teclado. |
protected void |
processMouseEvent(int type,
int x,
int y)
Procesa un evento de ratón. |
void |
processSkinProperties()
Procesa las propiedades del skin para el componente. |
void |
repaint()
Repinta el componente. |
boolean |
requestFocus()
Petición de foco para el componente. |
void |
setActionListener(ActionListener listener)
Asigna el listener de acciones. |
void |
setBackground(int background)
Cambia el color de fondo. |
void |
setBorder(int border)
Cambia el color del borde. |
void |
setBounds(int x,
int y,
int width,
int height)
Cambia la posición y el tamaño del componente. |
void |
setComponentListener(ComponentListener listener)
Asigna el listener de componente. |
void |
setCursor(Cursor cursor)
Cambia el cursor. |
void |
setCursorEnabled(int cursor_enabled)
Cambia el tipo de cursor. |
void |
setEnabled(boolean enabled)
Activa/Desactiva el componente. |
void |
setFocusListener(FocusListener listener)
Asigna el listener de foco. |
void |
setFont(IFont font)
Cambia el tipo de letra. |
void |
setForeground(int foreground)
Cambia el color de primer plano. |
void |
setKeyListener(KeyListener listener)
Asigna el listener de teclado. |
void |
setLocation(int x,
int y)
Cambia la posición del componente. |
void |
setMouseListener(MouseListener listener)
Asigna el listener de ratón. |
void |
setSize(int width,
int height)
Cambia el tamaño del componente. |
void |
setToolTip(java.lang.String tooltip)
Cambia el texto del tooltip. |
void |
setVisible(boolean visible)
Activa/Desactiva la visibilidad del componente. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int CURSOR_ENABLED_NEVER
public static final int CURSOR_ENABLED_ALWAYS
public static final int CURSOR_ENABLED_SWITCH
public static Skin skin
| Constructor Detail |
protected IComponent()
| Method Detail |
public void setLocation(int x,
int y)
x - Coordenada Xy - Coordenada Ypublic Point getLocation()
Point
public void setSize(int width,
int height)
width - Anchoheight - Altopublic Point getSize()
Point
public void setBounds(int x,
int y,
int width,
int height)
x - Coordenada Xy - Coordenada Ywidth - Anchoheight - Altopublic Rectangle getBounds()
Rectanglepublic int getX()
public int getY()
public int getWidth()
public int getHeight()
public void setForeground(int foreground)
foreground - Color ARGB (0 indica que no tiene color asignado)public int getForeground()
public void setBackground(int background)
background - Color ARGB (0 indica que no tiene color asignado)public int getBackground()
public void setBorder(int border)
border - Color ARGB (0 indica que no tiene)public int getBorder()
public void setFont(IFont font)
font - FuenteIFontpublic IFont getFont()
IFontpublic void setCursor(Cursor cursor)
cursor - CursorCursorpublic Cursor getCursor()
Cursorpublic void setCursorEnabled(int cursor_enabled)
cursor_enabled - Tipo de cursorCURSOR_ENABLED_NEVER,
CURSOR_ENABLED_ALWAYS,
CURSOR_ENABLED_SWITCHpublic int getCursorEnabled()
CURSOR_ENABLED_NEVER,
CURSOR_ENABLED_ALWAYS,
CURSOR_ENABLED_SWITCHpublic void setToolTip(java.lang.String tooltip)
tooltip - Texto (pueder ser 'null')public java.lang.String getToolTip()
public void setEnabled(boolean enabled)
enabled - True para activarlopublic boolean isEnabled()
public void setVisible(boolean visible)
visible - True para activarlapublic boolean isVisible()
public void repaint()
public boolean requestFocus()
public boolean isFocusOwner()
public void setActionListener(ActionListener listener)
listener - Listener (pueder ser 'null')ActionListenerpublic ActionListener getActionListener()
ActionListenerpublic void setComponentListener(ComponentListener listener)
listener - Listener (pueder ser 'null')ComponentListenerpublic ComponentListener getComponentListener()
ComponentListenerpublic void setFocusListener(FocusListener listener)
listener - Listener (pueder ser 'null')FocusListenerpublic FocusListener getFocusListener()
FocusListenerpublic void setKeyListener(KeyListener listener)
listener - Listener (pueder ser 'null')KeyListenerpublic KeyListener getKeyListener()
FocusListenerpublic void setMouseListener(MouseListener listener)
listener - Listener (pueder ser 'null')MouseListenerpublic MouseListener getMouseListener()
MouseListenerpublic IContainer getParent()
IContainerprotected IContainer getRoot()
IContainerpublic IScrollPane getScrollPane()
IScrollPane
public boolean contains(int x,
int y)
x - Coordenada Xy - Coordenada Ypublic Point getLocationOnScreen()
public int getSkinId()
public void processSkinProperties()
public void paint(javax.microedition.lcdui.Graphics g)
g - Contexto gráficopaintComponent(javax.microedition.lcdui.Graphics)public abstract void paintComponent(javax.microedition.lcdui.Graphics g)
g - Contexto gráficoprotected void processActionEvent(java.lang.Object data)
data - Datos relativos al evento (pueder ser 'null')protected void processComponentEvent(int type)
type - Tipo de eventoEvent.COMPONENT_HIDDEN,
Event.COMPONENT_MOVED,
Event.COMPONENT_RESIZED,
Event.COMPONENT_SHOWNprotected void processFocusEvent(int type)
type - Tipo de eventoEvent.FOCUS_GAINED,
Event.FOCUS_LOST
protected void processKeyEvent(int type,
int code,
int action,
char character)
type - Tipo de eventocode - Código de la teclaaction - Acción asociada al código de la teclacharacter - Caracter asociado al código de la tecla (0 si no tiene)Event.KEY_PRESSED,
Event.KEY_RELEASED,
Event.KEY_TYPED
protected void processMouseEvent(int type,
int x,
int y)
type - Tipo de eventox - Coordenada X relativa al componentey - Coordenada Y relativa al componenteEvent.MOUSE_ENTERED,
Event.MOUSE_EXITED,
Event.MOUSE_PRESSED,
Event.MOUSE_RELEASED,
Event.MOUSE_CLICKED,
Event.MOUSE_MOVED,
Event.MOUSE_DRAGGEDpublic java.lang.String toString()
|
Apime v1.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||