public class Panel extends Canvas implements CellConstants, LayoutManager
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
all |
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.
|
boolean |
equalHeights |
boolean |
equalWidths |
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 |
isFullScrollClient, origin, scrollPercent, virtualSizeclosedFocus, cycleFocus, dontAutoScroll, dontFocusOnChildren, FIND_FOR_MOUSE_PRESS, takeNextFocusbackGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, curFont, debugModify, debugRepaintNow, disabledBackground, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, fontChange, fontFrom, foreGround, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, lockPaint, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, name, next, parent, penStatus, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, startDragResolution, tags, tail, text, toolTip, width, x, yclipItems, clipObject, clipOwner, debugControl, debugFlag, doubleBuffer, doubleClickTime, doubleSizedFontHeight, firstPress, globalEditable, globalEnabled, PEN_STATUS_DID_HOLD_DOWN, PEN_STATUS_GOT_PEN_DOWN, PEN_STATUS_PEN_IS_ON, pressPoint, TAG_BOOLEAN_KEEP_BELOW_SIP, TAG_HOVER_TIME_INT, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamedALWAYS_STRETCHABLE, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_HIDDEN, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TAG_BACKGROUND_IMAGE, TAG_BUSY_DISPLAY, TAG_COLORS, TAG_CONTROL_PAINTER, TAG_EXPOSE_GROUP, TAG_FIXEDSIZE, TAG_GRAY_BACKGROUND, TAG_HIDE_CONTROL_OBJECT, TAG_HIDE_PARENT, TAG_INNER_TEXT_INSETS, TAG_INPUT_STACK_PARENT, TAG_INSETS, TAG_MAKE_VISIBLE, TAG_MAXIMUMSIZE, TAG_MINIMUMSIZE, TAG_PAINT_CONTROL_LIST, TAG_PREFERRED_TEXT_SIZE, TAG_PREFERRED_TEXT_SIZE_HEIGHT, TAG_PREFERRED_TEXT_SIZE_WIDTH, TAG_PREFERREDSIZE, TAG_RECT, TAG_SHADOW_INSETS, TAG_SPAN, TAG_SWIPER, TAG_TEMPORARY_ERROR, TAG_TEXT_INSETS, TAG_TEXTSIZE, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WESTGoHigher, GoLower, Horizontal, OPTION_INDICATOR_ONLY, PageHigher, PageLower, ScrollHigher, ScrollLower, TrackTo, VerticalBDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_ABUT_ANY, BF_ABUT_BOTTOM, BF_ABUT_LEFT, BF_ABUT_RIGHT, BF_ABUT_TOP, 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_SUNKENAll, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, ContainerDontPaintChildren, Disabled, DisablePopupMenu, DisplayOnly, DontBuffer, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, ModifiersInheritedFromWindow, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpUIEvents, ShowSIP, ShrinkToNothing, SmallControl, TakeChildUIEvents, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDownKEEP_VISIBLE| Constructor and Description |
|---|
Panel()
Create a new Panel which uses itself to layout components.
|
Panel(LayoutManager layout)
Create a new Panel which uses a specific layout manager.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
Control |
addLast(Control c,
int cellConstraints,
int controlConstraints) |
Control |
addNext(Control c) |
Control |
addNext(Control c,
boolean last) |
Control |
addNext(Control c,
int cellConstraints) |
Control |
addNext(Control c,
int cellConstraints,
int controlConstraints) |
protected void |
calculatedSizes()
This is called after calculateSizes() has been called.
|
protected void |
calculateSizes()
Override this to calculate the preferred, minimum and maximum size of your control.
|
void |
doBorder(Graphics g) |
Control |
endRow() |
Object |
getControlTag(int tag,
Control c,
Object defaultValue) |
Dimension |
getPreferredSize(Grid controls,
Panel panel,
Dimension destination) |
ControlIterator |
getSubControls(ControlIterator it)
This returns an Iterator that goes forwards through the components
which are considered a sub-control of this Control, even though they
may not be a "child" of the control -
i.e. it may not have been added into the Control heirarchy.
|
Control |
insertRow(Control c,
int atRow) |
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 |
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)
Resize the control and force all subcontrols to be considered to be reshown and
relaid out.
|
void |
resizeTo(int width,
int height)
This is called to change the width and height values.
|
void |
sendToChildListeners(Event ev) |
void |
setAsBelowSip() |
void |
setText(String text)
Calling setText() on a CellPanel gives it a labelled etched border.
|
canGo, canScreenScroll, checkScrolls, doScroll, fixOrigin, getActual, getBuffer, getCurrent, getDisplayedSize, getMyHeight, getMySize, getMyWidth, getPercent, getScrollablePanel, getScrollClient, getVisible, getVisibleArea, needScrollBar, onScroll, onSetOrigin, reduceClip, scroll, scroll, scrollToVisible, setOrigin, updateScrollServeradd, completeAddPopupControl, containerHasFocus, dismantle, dismantle, doHotKey, doPaint, findChild, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getFirstFocus, getNextKeyFocus, gotFocus, grayOut, hide, lostFocus, relayout, removeAll, removePopupControl, repaintDataNow, setHidden, startAddPopupControl, takeFocus, takePromptControl, unhideacceptsData, activate, addListener, amOnTopFrame, applyFontChange, baseOnPenEvent, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, cache, calculateTextSize, calculateTextSize, calculateTextSize, cancelHoldDown, cancelPenPress, canEdit, change, changeDimension, changeTag, checkClipboardOperations, checkExitKey, checkMenu, checkMenuKey, checkModifiers, checkParentInterceptsUIEvent, checkPenTransparent, childrenPainted, clearTag, clipboardToString, clipboardTransfer, closeMenu, contains, contains, createNewMenu, dataAccepted, dataBeingRemoved, dataDraggedOff, dataDraggedOver, dataDraggedOver, dataDroppedOn, dataTransferCancelled, deactivate, defaultTo, deferInWindowThread, doAction, doActionKey, doBackground, doMenu, dontAcceptDrop, doPaintChildren, doPaintData, doPaintData, doShowMenu, dragged, draw, draw, draw, exitEntry, fillBackground, fillBackgroundNotInFrame, findTagInParents, fontChanged, formClosing, free, fromClipboard, fromField, fromField, getAllDescendants, getAllSubControls, getAncestor, getAncestor, getAncestorProperty, getBackground, getCached, getCachedChildren, getCachedDim, getCachedDim, getCachedRect, getCachedRect, getCachedSubControls, getChildAnchor, getChildren, getChildrenBackwards, getClipboardMenu, getClipObject, getContentsInsets, getContentsInsets, getContentsRect, getDataToCopy, getDataToDragAndDrop, getDim, getDisplayText, getDragAndDropContext, getFieldTransfer, getFont, getFontMetrics, getFontMetrics, getFontMetricsForSizeCalculations, getForeground, getFrame, getFrameOrContainer, getGraphics, getGraphics, getHeight, getHideParent, getImage, getLastSelected, getLocation, getLock, getMaximumSize, getMenu, getMinimumSize, getModifiedBorderFlags, getModifiers, getNext, getPaintParameters, getParent, getParent, getParent, getParentOrListener, getPasswordCharacter, getPosInFrame, getPosInFrame, getPosInParent, getPosInParent, getPreferredSize, getPreferredSizeByParent, getPreferredTextSize, getPrompt, getPromptText, getRect, getRect, getServer, getSize, getSizes, getSubControls, getTag, getText, getToolTip, getWidth, getWindow, getWindowGraphics, hasModifier, hasPopupFormAttached, hasTag, hide, inheritModifiers, insetToContents, interceptChildUIEvent, isChildOf, isDirectChildOfWindow, isHidden, isModal, isOnMe, isOnMe, isOnMe, isSomeonesHotKey, makeFrameTopMost, makeHot, makeHot, makeInvisible, makeVisible, markAsTemporaryError, menuIsActive, menuStateChanged, modify, modifyAll, modifyAll, modifyFlags, mouseHover, newEventThread, notifyAction, notifyDataChange, notifyDataChange, notifyMenuItemSelected, notifyStructureChanged, onControlEvent, onEvent, onKeyEvent, onLabelPenEvent, onPenEvent, paintBackground, paintWithControlPainter, pauseEventThread, penClicked, penDoubleClicked, penHeld, penPressed, penReleased, penRightReleased, popupBeep, popupMenuClosed, popupMenuEvent, popupMenuEvent, postEvent, postInWindowThread, postUIEvent, putInside, queueKeyEvent, queuePenEvent, readLock, recalculatePreferredSize, redisplay, refresh, releaseBufferedGraphics, removed, removeListener, repaint, repaint, repaintInWindowThread, repaintInWindowThread, repaintNow, repaintNow, repaintNow, repaintNow, requestPaint, requestResizeTo, resetAllCachedProperties, resetCachedProperties, resetRect, restore, restoreBorderModifiers, restoreFlags, resumeEventThread, scrollAndRepaint, sendToListeners, set, setAllFonts, setBackgroundImage, setBorder, setBorderModifiers, setCell, setChildAnchor, setClipObject, setControl, setCursor, setFieldTransfer, setFixedSize, setFont, setFontChange, setFreeDragging, setHidden, setHiddenParent, setHotKey, setHotKey, setLocation, setMaximumSize, setMenu, setMinimumSize, setPreferredSize, setPreferredTextSize, setPreferredTextSize, setPromptControl, setRect, setRect, setScaledBackgroundImage, setServer, setShadow, setSwiping, setTag, setTags, setTextSize, setTiledBackgroundImage, setToolTip, showHoldDownIndicator, shown, simulateClickOn, simulateKeyPresses, simulateKeyType, standardOnKeyEvent, startDragAndDrop, startDragAndDrop, startDragging, stopDragging, takeData, takeFromClipboard, testInWindowThread, ticked, tipIsDisplayed, toClipboard, toField, toField, toIDString, toString, toTextData, transferPenPress, transferPenPress, tryDragAndDrop, tryGetGraphics, tryNext, tryStartMenu, unhide, unlock, updateData, updateDCDuringDD, updateFrom, updateTo, verifyWantDrag, verifyWantHoldDown, waitEventThread, willAcceptDrop, willShowFrame, windowHasFloatingControls, writeLockdoubleSizeIt, getGuiTextHeight, isDoubleSized, isDoubleSizedFont, loadImage, tryLoadImageclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetServer, setServerprotected 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 boolean equalWidths
public boolean equalHeights
public LayoutManager layoutManager
protected Vector childListeners
protected Vector all
protected Control lastAdded
protected boolean made
protected boolean calculated
protected int titleGap
public Panel()
public Panel(LayoutManager layout)
public boolean isEmpty()
public Control endRow()
public void setText(String text)
public void addChildListener(EventListener list)
public void removeChildListener(EventListener list)
public void sendToChildListeners(Event ev)
public void make(boolean reMake)
Containerpublic void setAsBelowSip()
public void layout(Grid controls, Panel panel, Rect panelRect)
layout in interface LayoutManagerpublic Dimension getPreferredSize(Grid controls, Panel panel, Dimension destination)
getPreferredSize in interface LayoutManagerpublic void addDirectly(Control c)
addDirectly in class Containerpublic void remove(Control c)
Containerpublic ControlIterator getSubControls(ControlIterator it)
ControlgetSubControls in class Controlprotected void calculateSizes()
ControlcalculateSizes in class Controlprotected void calculatedSizes()
ControlcalculatedSizes in class Controlpublic void resizeTo(int width,
int height)
Controlpublic void reShow(int x,
int y,
int toWidth,
int toHeight)
Containerpublic void relayoutMe(boolean redisplay)