|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--jv.object.PsPanel
Default base class for info panels, and often used instead of Panel.
Implements the update mechanism and simplifies setting of layouts.
Each non-gui class may have associated inspectors derived from PsPanel.
Subclasses must call the init() method in each constructor and
each init()
method must call super.init() at first.
public class myClass extends mySuperClass
public myClass() {
...
if (getClass() == myClass.class)
init();
}
public void init() {
super.init();
...
}
Only this ensures that the init() method is called. Otherwise even the
init() methods of the superclasses will not be called.
| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static int |
BORDER_GROOVE
|
static int |
BORDER_LINE
|
static int |
BORDER_NONE
|
static int |
BORDER_SUNK
|
protected int |
m_borderType
|
protected boolean |
m_bOutOfDate
Flag determines whether this panel is out of sync with its parent. |
protected java.awt.Image |
m_image
Image to be shown in the background of the canvas. |
protected int |
m_insetSize
|
protected java.lang.String |
m_language
Language used for text on this panel during construction. |
protected java.awt.Label |
m_lTitle
Title of panel usually displayed in bold. |
protected PsUpdateIf |
m_parent
Sends update events to this instance. |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
PsPanel()
Constructor of panel with PsStackLayout(1) as default layout. |
|
| Method Summary | |
java.awt.Panel |
addLabelComponent(java.lang.String label,
java.awt.Component comp)
Add a horizontal panel with a label and a component with GridLayout(1, 2). |
void |
addLine(int size)
Add a horizontal line with specified thickness as separator. |
java.awt.Label |
addSubTitle(java.lang.String aTitle)
Add subtitle to dialog in subheader font and return label. |
java.awt.TextField |
addTextField(java.lang.String title,
int length)
Add a label and textField in a horizontal panel with GridLayout(1, 2). |
java.awt.Label |
addTitle(java.lang.String aTitle)
Add title to dialog in header font and return label m_lTitle. |
static void |
drawBorder(java.awt.Component comp,
java.awt.Graphics g,
int borderType)
Draw border around panel. |
void |
drawBorder(java.awt.Graphics g,
int borderType)
Draw border around panel. |
void |
drawText(java.awt.Graphics g,
java.awt.Point point,
java.lang.String string)
Draw text at specified position. |
PsUpdateIf |
getFather()
Get parent and do nothing else. |
java.awt.Insets |
getInsets()
Overwrite Container.getInsets() to create a border of
m_insetSize pixels to allow drawing of a border around panel. |
java.lang.String |
getLanguage()
Get language used in this panel. |
java.awt.Label |
getTitle()
Get label of panel title, or null of no title exists. |
boolean |
hasTitle()
Check whether dialog has a title. |
void |
init()
|
boolean |
instanceOf(java.lang.String aClassName)
Deprecated. use "if (getClass() == PsObject.class)" instead |
void |
paint(java.awt.Graphics g)
Call super.paint(g) and draw border around panel.
|
void |
setBorderType(int borderType)
Set border of panel which is automatically drawn. |
void |
setImage(java.awt.Image image)
Image to be shown in the background of the canvas and set layout to null. |
void |
setInsetSize(int size)
|
void |
setOutOfDate(boolean state)
Mark this panel as being not synchronized with the correct data of its parent. |
void |
setParent(PsUpdateIf aParent)
Set parent and do nothing else. |
void |
setTitle(java.lang.String title)
Set string of panel title. |
void |
setVisible(boolean flag)
Override Component.setVisible(boolean) to give panel
a chance to update its content when is becomes visible.
|
void |
update(java.awt.Graphics g)
Override Component.update(Graphics) to avoid clearing
the component if an image is available. |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.object.PsUpdateIf |
getName |
| Field Detail |
public static final int BORDER_NONE
public static final int BORDER_LINE
public static final int BORDER_SUNK
public static final int BORDER_GROOVE
protected int m_borderType
protected int m_insetSize
protected java.awt.Label m_lTitle
addTitle(String),
addSubTitle(String),
setTitle(String)protected java.lang.String m_language
getLanguage()protected PsUpdateIf m_parent
PsObject.update(Object)protected java.awt.Image m_image
protected boolean m_bOutOfDate
setOutOfDate(boolean)| Constructor Detail |
public PsPanel()
PsStackLayout(1) as default layout.| Method Detail |
public void init()
public java.lang.String getLanguage()
public void setImage(java.awt.Image image)
public void setVisible(boolean flag)
Component.setVisible(boolean) to give panel
a chance to update its content when is becomes visible.
Parent of panel usually does not update panel if panel is hidden.setVisible in class java.awt.Componentpublic PsUpdateIf getFather()
PsUpdateIfgetFather in interface PsUpdateIfjv.object.PsUpdateIfPsUpdateIf.setParent(PsUpdateIf),
PsUpdateIf.update(Object)public void setParent(PsUpdateIf aParent)
PsUpdateIfsetParent in interface PsUpdateIfjv.object.PsUpdateIfaParent - will receive events which this does not handlePsUpdateIf.getFather(),
PsUpdateIf.update(Object)public boolean update(java.lang.Object event)
update in interface PsUpdateIfjv.object.PsUpdateIfevent - carries a lot of informationPsObject,
PsUpdateIf.getFather(),
PsUpdateIf.setParent(PsUpdateIf)public final boolean instanceOf(java.lang.String aClassName)
false.
This method is different from Java operator instanceof which
is true even if current instance is subclass of class 'aClassName'.aClassName - name of class without package identifierspublic java.awt.Insets getInsets()
Container.getInsets() to create a border of
m_insetSize pixels to allow drawing of a border around panel.getInsets in class java.awt.ContainersetInsetSize(int),
setBorderType(int)public void setInsetSize(int size)
public java.awt.Label getTitle()
null of no title exists.public boolean hasTitle()
public void setTitle(java.lang.String title)
public java.awt.Label addTitle(java.lang.String aTitle)
m_lTitle.public java.awt.Label addSubTitle(java.lang.String aTitle)
public void addLine(int size)
public java.awt.TextField addTextField(java.lang.String title,
int length)
public java.awt.Panel addLabelComponent(java.lang.String label,
java.awt.Component comp)
public void drawText(java.awt.Graphics g,
java.awt.Point point,
java.lang.String string)
public void drawBorder(java.awt.Graphics g,
int borderType)
public static void drawBorder(java.awt.Component comp,
java.awt.Graphics g,
int borderType)
public void setBorderType(int borderType)
borderType==PsPanel.BORDER_NONE drawing is disabled,
otherwise the borderType is set and drawing is enabled.borderType - type of border, for possible values see PsPanel.paint(Graphics)public void setOutOfDate(boolean state)
public void paint(java.awt.Graphics g)
super.paint(g) and draw border around panel.
If this panel is out of date, then this panel is first synchronised
with new data from its parent by calling this.update(m_parent).paint in class java.awt.ContainersetBorderType(int)public void update(java.awt.Graphics g)
Component.update(Graphics) to avoid clearing
the component if an image is available.update in class java.awt.Container
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||