|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.ControlBase
ewe.ui.Control
ewe.ui.Container
ewe.ui.Canvas
ewe.ui.Panel
A Panel is a general Container that is simpler than a CellPanel and which uses a Layout manager to layout it components. While it is not as flexible as a CellPanel and cannot support advanced features such as PanelSplitters it is faster than a CellPanel when laying out its controls.
| Field Summary | |
protected Vector |
all
|
Image |
backgroundImage
This is an optional background image to display. |
protected boolean |
calculated
|
protected Vector |
childListeners
|
int |
defaultAddToMeCellConstraints
The default cell constraints when controls are added to the Panel. |
TagList |
defaultTags
This contains default Tag values for the controls added to the Panel. |
protected Grid |
grid
|
protected Control |
lastAdded
|
LayoutManager |
layoutManager
This is the LayoutManager being used by the Panel. |
protected boolean |
made
|
protected static Insets |
noInsets
|
boolean |
stretchFirstColumn
This is only used if the Panel is acting as its own LayoutManager - which it is by default. |
boolean |
stretchFirstRow
This is only used if the Panel is acting as its own LayoutManager - which it is by default. |
boolean |
stretchLastColumn
This is only used if the Panel is acting as its own LayoutManager - which it is by default. |
boolean |
stretchLastRow
This is only used if the Panel is acting as its own LayoutManager - which it is by default. |
protected int |
titleGap
|
| Fields inherited from class ewe.ui.Canvas |
isFullScrollClient, origin, scrollPercent, virtualSize |
| Fields inherited from class ewe.ui.Container |
closedFocus, cycleFocus, dontAutoScroll, dontFocusOnChildren |
| Fields inherited from class ewe.ui.Control |
_debug, backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, DoPaintMethod, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, foreGround, haveNativePaint, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, MyClass, name, next, np, parent, penStatus, popupSound, popupSoundClip, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, standardBorder, standardEdge, startDragResolution, tags, tail, text, toolTip, width, x, y |
| Fields inherited from class ewe.ui.ControlBase |
clipItems, clipObject, clipOwner, curPoint, currentPenEvent, debugControl, debugFlag, DidHoldDown, doubleBuffer, doubleClickTime, firstPress, globalDrawFlat, globalEditable, globalEnabled, globalPalmStyle, globalSmallControls, GotPenDown, PenIsOn, pressPoint, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed, useNativeTextInput |
| Fields inherited from interface ewe.ui.CellConstants |
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST |
| Fields inherited from interface ewe.ui.IScroll |
Higher, Horizontal, Lower, OPTION_INDICATOR_ONLY, PageHigher, PageLower, ScrollHigher, ScrollLower, TrackTo, Vertical |
| Fields inherited from interface ewe.ui.UIConstants |
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN |
| Fields inherited from interface ewe.ui.ControlConstants |
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown |
| Fields inherited from interface ewe.fx.ImageRefresher |
KEEP_VISIBLE |
| Constructor Summary | |
Panel()
Create a new Panel which uses itself to layout components. |
|
Panel(LayoutManager layout)
Create a new Panel which uses a specific layout manager. |
|
| Method Summary | |
Control |
add(Control c,
int x,
int y,
int width,
int height)
|
void |
addChildListener(EventListener list)
|
void |
addDirectly(Control c)
Use this to add a control directly to the Panel. |
Control |
addLast(Control c)
|
Control |
addLast(Control c,
int cellConstraints,
int controlConstraints)
|
Control |
addNext(Control c)
|
Control |
addNext(Control c,
boolean last)
|
Control |
addNext(Control c,
int cellConstraints,
int controlConstraints)
|
protected void |
calculateSizes()
Override this to calculate the preferred, minimum and maximum size of your control. |
void |
doBackground(Graphics g)
|
void |
doBorder(Graphics g)
|
Control |
endRow()
|
Object |
getControlTag(int tag,
Control c,
Object defaultValue)
|
Dimension |
getPreferredSize(Grid controls,
Panel panel,
Dimension destination)
|
Iterator |
getSubControls()
|
boolean |
isEmpty()
|
void |
layout(Grid controls,
Panel panel,
Rect panelRect)
|
void |
make(boolean reMake)
This is used to "make" the control before being displayed. |
void |
relayout(boolean redisplay)
Force a recalculation of all preferredSize() and resizing/positioning of the panel. |
void |
relayoutMe(boolean redisplay)
This forces a recalculation of my preferred size, but not those of my children. |
void |
remove(Control c)
Removes a child control from the container. |
void |
removeChildListener(EventListener list)
|
void |
reShow(int x,
int y,
int toWidth,
int toHeight)
|
void |
resizeTo(int width,
int height)
This will change the width and height values. |
void |
sendToChildListeners(Event ev)
|
void |
setText(String text)
Calling setText() on a CellPanel gives it a labelled etched border. |
| Methods inherited from class ewe.ui.Canvas |
canGo, canScreenScroll, checkScrolls, doScroll, fixOrigin, getActual, getBuffer, getCurrent, getDisplayedSize, getMySize, getPercent, getScrollablePanel, getScrollClient, getVisible, getVisibleArea, needScrollBar, onScroll, onSetOrigin, reduceClip, scroll, scroll, scrollToVisible, setOrigin, updateScrollServer |
| Methods inherited from class ewe.ui.Container |
_paintChildren, add, containerHasFocus, dismantle, dismantle, doHotKey, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getChildrenBackwards, getFirstFocus, getNextKeyFocus, gotFocus, lostFocus, removeAll, repaintDataNow, takeFocus, takePromptControl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Methods inherited from interface ewe.ui.ScrollClient |
getServer, setServer |
| Field Detail |
protected static Insets noInsets
public TagList defaultTags
public int defaultAddToMeCellConstraints
protected Grid grid
public boolean stretchFirstColumn
public boolean stretchFirstRow
public boolean stretchLastColumn
public boolean stretchLastRow
public LayoutManager layoutManager
public Image backgroundImage
protected Vector childListeners
protected Vector all
protected Control lastAdded
protected boolean made
protected boolean calculated
protected int titleGap
| Constructor Detail |
public Panel()
public Panel(LayoutManager layout)
| Method Detail |
public boolean isEmpty()
public Object getControlTag(int tag,
Control c,
Object defaultValue)
public Control add(Control c,
int x,
int y,
int width,
int height)
public Control addNext(Control c,
boolean last)
public Control addLast(Control c)
public Control addNext(Control c)
public Control endRow()
public Control addNext(Control c,
int cellConstraints,
int controlConstraints)
public Control addLast(Control c,
int cellConstraints,
int controlConstraints)
public void setText(String text)
setText in class Controlpublic void addChildListener(EventListener list)
public void removeChildListener(EventListener list)
public void sendToChildListeners(Event ev)
public void make(boolean reMake)
Control
make in class ControlreMake - if this is true then you should do a full re-make.
public void layout(Grid controls,
Panel panel,
Rect panelRect)
layout in interface LayoutManager
public Dimension getPreferredSize(Grid controls,
Panel panel,
Dimension destination)
getPreferredSize in interface LayoutManagerpublic void addDirectly(Control c)
addDirectly in class Containerpublic void remove(Control c)
Container
remove in class Containerpublic Iterator getSubControls()
getSubControls in class Controlprotected void calculateSizes()
Control
calculateSizes in class Controlpublic void doBackground(Graphics g)
doBackground in class Control
public void resizeTo(int width,
int height)
Control
resizeTo in class Controlpublic void doBorder(Graphics g)
doBorder in class Canvaspublic void relayout(boolean redisplay)
public void reShow(int x,
int y,
int toWidth,
int toHeight)
public void relayoutMe(boolean redisplay)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||