net.yura.mobile.gui.components
Class Panel

java.lang.Object
  extended by net.yura.mobile.gui.components.Component
      extended by net.yura.mobile.gui.components.Panel
Direct Known Subclasses:
FrameTitlePane, ScrollPane, TabbedPane, Table, Window

public class Panel
extends Component

Author:
Yura Mamyrin
See Also:
JPanel

Field Summary
 
Fields inherited from class net.yura.mobile.gui.components.Component
background, empty, FOCUS_GAINED, FOCUS_LOST, focusable, foreground, height, parent, posX, posY, preferredHeight, preferredWidth, state, theme, width
 
Constructor Summary
Panel()
           
Panel(Layout n)
           
 
Method Summary
protected  void addImpl(Component component, Object cons, int index)
           
protected  void breakOutAction(Component component, int direction, boolean scrolltothere, boolean forceFocus)
           
protected  void doLayout()
          redo the layout (SHOULD NOT BE CALLED OUTSIDE THE FRAMEWORK)
 Button findMneonicButton(int mnu)
           
 Component getComponentAt(int x, int y)
           
 int getComponentCount()
           
 Vector getComponents()
           
 Hashtable getConstraints()
           
protected  String getDefaultName()
           
 Layout getLayout()
           
 void paint(Graphics2D g)
          override and call super when things HAVE to be painted
 void paintChildren(Graphics2D g)
           
 void paintComponent(Graphics2D g)
           
 void remove(Component component)
           
 void remove(int c)
           
 void removeAll()
           
 void setLayout(Layout lt)
           
 void setSize(int width, int height)
          sets the new size and revaliates the window
 String toString()
           
 void validate()
          this means reclac the size of children and then redo the layout
 void workoutMinimumSize()
          works out the current size of this panel (SHOULD NOT BE CALLED OUTSIDE THE FRAMEWORK)
 
Methods inherited from class net.yura.mobile.gui.components.Component
add, add, add, addFocusListener, animate, clip, consumesMotionEvents, focusGained, focusLost, getBackground, getBorder, getCurrentState, getDesktopPane, getFocusListeners, getForeground, getHeight, getHeightWithBorder, getInsets, getName, getParent, getPreferredHeight, getPreferredWidth, getState, getToolTipLocationX, getToolTipLocationY, getToolTipText, getValue, getWidth, getWidthWithBorder, getWindow, getX, getXOnScreen, getXWithBorder, getY, getYOnScreen, getYWithBorder, insert, insert, isComponentVisible, isFocusable, isFocusOwner, isOpaque, isRectVisible, isShowing, isVisible, makeVisible, paintBorder, processKeyEvent, processMouseEvent, processMultitouchEvent, removeFocusListener, removeParent, repaint, requestFocusInWindow, revalidate, scrollRectToVisible, scrollUpDown, setBackground, setBorder, setBounds, setBoundsWithBorder, setFocusable, setForeground, setLocation, setName, setPreferredSize, setState, setToolTipText, setupState, setValue, setVisible, transferFocus, updateUI, wait, workoutSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Panel

public Panel()
See Also:
JPanel.JPanel

Panel

public Panel(Layout n)
Parameters:
n - the LayoutManager to use
See Also:
JPanel.JPanel
Method Detail

addImpl

protected void addImpl(Component component,
                       Object cons,
                       int index)
Overrides:
addImpl in class Component
See Also:
Container.addImpl

breakOutAction

protected void breakOutAction(Component component,
                              int direction,
                              boolean scrolltothere,
                              boolean forceFocus)

doLayout

protected void doLayout()
redo the layout (SHOULD NOT BE CALLED OUTSIDE THE FRAMEWORK)

See Also:
Container.doLayout

findMneonicButton

public Button findMneonicButton(int mnu)

getComponentAt

public Component getComponentAt(int x,
                                int y)
Parameters:
x - the x coordinate
y - the y coordinate
Returns:
the top-most child is returned
See Also:
Container.getComponentAt

getComponentCount

public int getComponentCount()
Returns:
the number of components in this panel
See Also:
Container.getComponentCount

getComponents

public Vector getComponents()
Returns:
an array of all the components in this container
See Also:
Container.getComponents

getConstraints

public Hashtable getConstraints()

getDefaultName

protected String getDefaultName()
Specified by:
getDefaultName in class Component

getLayout

public Layout getLayout()
See Also:
Container.getLayout

paint

public void paint(Graphics2D g)
Description copied from class: Component
override and call super when things HAVE to be painted

Overrides:
paint in class Component
Parameters:
g - Graphics object
See Also:
Container.paint

paintChildren

public void paintChildren(Graphics2D g)
Parameters:
g - Graphics object
See Also:
Container.paintComponents

paintComponent

public void paintComponent(Graphics2D g)
Specified by:
paintComponent in class Component
See Also:
JComponent.paintComponent

remove

public void remove(Component component)
Parameters:
component - The component to remove
See Also:
Container.remove

remove

public void remove(int c)
Parameters:
c - The index of the component to remove
See Also:
Container.remove

removeAll

public void removeAll()
See Also:
Container.removeAll

setLayout

public void setLayout(Layout lt)
Parameters:
lt - the specified layout manager
See Also:
Container.setLayout

setSize

public void setSize(int width,
                    int height)
sets the new size and revaliates the window

Overrides:
setSize in class Component
Parameters:
width - new Width
height - new Height
See Also:
Component.setSize

toString

public String toString()
Overrides:
toString in class Component
See Also:
Component.toString

validate

public void validate()
this means reclac the size of children and then redo the layout

Overrides:
validate in class Component
See Also:
JComponent.validate

workoutMinimumSize

public void workoutMinimumSize()
works out the current size of this panel (SHOULD NOT BE CALLED OUTSIDE THE FRAMEWORK)

Specified by:
workoutMinimumSize in class Component
See Also:
JComponent.getMinimumSize