public class MultiCardPanelAdapter extends CellPanel implements MultiCardPanel
Modifier and Type | Field and Description |
---|---|
CardPanel |
cardPanel
This does the actual MultiPanel work.
|
protected Vector |
selectedCards |
autoSpan, layout, mySplitter, nextSplitter, quickRecalculate
all, calculated, childListeners, defaultAddToMeCellConstraints, defaultTags, equalHeights, equalWidths, grid, lastAdded, layoutManager, made, noInsets, stretchFirstColumn, stretchFirstRow, stretchLastColumn, stretchLastRow, titleGap
isFullScrollClient, origin, scrollPercent, virtualSize
closedFocus, cycleFocus, dontAutoScroll, dontFocusOnChildren, FIND_FOR_MOUSE_PRESS, takeNextFocus
backGround, 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, y
clipItems, 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, unnamed
ADD_OPTION_DONT_SHOW_TEXT_WITH_ICON, EXTRA_CONTROL_BOTTOM, EXTRA_CONTROL_EXTREME, EXTRA_CONTROL_LEFT, EXTRA_CONTROL_RIGHT, EXTRA_CONTROL_TOP, OPTION_AUTO_SCROLL, OPTION_DONT_FOCUS_ON_ANY_SELECT, OPTION_DONT_FOCUS_ON_NEXT_SELECT, OPTION_FOCUS_ON_CONTROLS_AFTER_SELECTION_HOT_KEY, OPTION_ITEM_SELECTOR_ALWAYS_ENABLED, OPTION_SWIPABLE_HORIZONTALLY, OPTION_SWIPABLE_VERTICALLY, OPTION_SWIPE_USING_CONTROL, OPTION_VERTICAL_SCROLLER
ALWAYS_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, WEST
GoHigher, GoLower, Horizontal, OPTION_INDICATOR_ONLY, PageHigher, PageLower, ScrollHigher, ScrollLower, TrackTo, Vertical
BDR_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_SUNKEN
All, 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, WantHoldDown
KEEP_VISIBLE
Constructor and Description |
---|
MultiCardPanelAdapter() |
Modifier and Type | Method and Description |
---|---|
Card |
addCard(Control toAdd,
IImage icon,
String cardName,
String longCardName,
int options)
Add a Card with an icon and card name.
|
Card |
addCard(Control item,
String tabName,
String longName)
Add a new item to the MultiCardPanel.
|
Card |
addCard(Control toAdd,
String cardName,
String longCardName,
int cardOptionsToSet,
int cardOptionsToClear)
Add a Card, but temporarily modify the card options before adding and restore after adding.
|
protected void |
addedNewCard(Card c)
This is called when a new card is added.
|
Control |
addItem(Control item,
String tabName,
String longName)
This adds a control to the MultiPanel with a specified short (Tab) name and
optional long name.
|
CardPanel |
getCardPanel()
Return the CardPanel associated with this MultiCardPanel (which may be null).
|
CellPanel |
getExtraControlArea(int whichArea)
If this MultiCardPanel supports an extra area for placing controls
which are not within the dynamic display area, then this will return
a CellPanel that you can add controls to which will be displayed in
that area.
|
Card |
getItem(Control item)
This returns a Card object holding information about the item added for the
specified control.
|
Card |
getItem(int index)
This returns a Card object holding information about the item added at the
specified index.
|
int |
getItemCount()
This returns the number of items added to the MultiPanel.
|
int |
getSelectedItem()
This returns the index for the currently selected item.
|
long |
modifyAndSaveCardOptions(int optionsToSet,
int optionsToClear)
Set and/or clear card options and return a value that can be used with
restoreCardOptions() to restore the changed bits back to their original state.
|
int |
modifyCardOptions(int optionsToSet,
int optionsToClear)
Set and/or clear card options - or return the current options (if
optionsToSet and optionsToClear are zero).
|
protected void |
newSelection(Card c)
This is called when a new Card has been selected.
|
void |
onControlEvent(ControlEvent ev) |
int |
removeCardAt(int which) |
int |
restoreCardOptions(long savedOptions)
Restore the card option bits changed by modifyAndSaveCardOptions().
|
void |
select(Card card)
Select the specified card.
|
void |
select(Control item)
This selects for display one of the previously added Controls.
|
void |
select(int index)
This selects for display one of the previously added Controls, given the
index of the item.
|
void |
select(String tabName)
This selects for display one of the previously added Controls, given the
short (tab) name for the item.
|
void |
updateCard(Card card)
This can be called explicitly if a change has been made to the Card.
|
calculateSizes, getFloatingControls, getSubControls, hasFloatingControls, make, makeLayoutGrid, onEvent, relayoutMe, removeAll, reShow, resize, resizeTo
add, addChildListener, addDirectly, addLast, addLast, addLast, addNext, addNext, addNext, addNext, calculatedSizes, doBorder, endRow, getControlTag, getPreferredSize, insertRow, isEmpty, layout, remove, removeChildListener, sendToChildListeners, setAsBelowSip, setText
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, updateScrollServer
add, completeAddPopupControl, containerHasFocus, dismantle, dismantle, doHotKey, doPaint, findChild, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getFirstFocus, getNextKeyFocus, gotFocus, grayOut, hide, lostFocus, relayout, removePopupControl, repaintDataNow, setHidden, startAddPopupControl, takeFocus, takePromptControl, unhide
acceptsData, 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, 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, writeLock
doubleSizeIt, getGuiTextHeight, isDoubleSized, isDoubleSizedFont, loadImage, tryLoadImage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getServer, setServer
public CardPanel cardPanel
protected Vector selectedCards
protected void addedNewCard(Card c)
c
- the Card that was added.protected void newSelection(Card c)
public int removeCardAt(int which)
public Card addCard(Control item, String tabName, String longName)
MultiCardPanel
addCard
in interface MultiCardPanel
item
- The item to be addedtabName
- The name to appear on the tab.public Card addCard(Control toAdd, IImage icon, String cardName, String longCardName, int options)
MultiCardPanel
addCard
in interface MultiCardPanel
toAdd
- the item to add.icon
- an optional icon to associate with the item.cardName
- the display name of item.longCardName
- a longer title for the item.options
- any combination of the ADD_OPTIONS.public void select(Control item)
MultiPanel
select
in interface MultiPanel
public void select(String tabName)
MultiPanel
select
in interface MultiPanel
public void select(int index)
MultiPanel
select
in interface MultiPanel
public void select(Card card)
MultiCardPanel
select
in interface MultiCardPanel
public CardPanel getCardPanel()
MultiCardPanel
getCardPanel
in interface MultiCardPanel
public Card getItem(int index)
MultiCardPanel
getItem
in interface MultiCardPanel
public Card getItem(Control item)
MultiCardPanel
getItem
in interface MultiCardPanel
public int getSelectedItem()
MultiPanel
getSelectedItem
in interface MultiPanel
public int getItemCount()
MultiPanel
getItemCount
in interface MultiPanel
public CellPanel getExtraControlArea(int whichArea)
MultiCardPanel
getExtraControlArea
in interface MultiCardPanel
whichArea
- one of the EXTRA_CONTROL_XXX values possibly OR'ed with
the EXTRA_CONTROL_EXTREME option.public int modifyCardOptions(int optionsToSet, int optionsToClear)
MultiCardPanel
modifyCardOptions
in interface MultiCardPanel
optionsToSet
- the option bits to set - any of the OPTION_XXX values, but none that are included in options to clear.optionsToClear
- the option bits to clear - any of the OPTION_XXX values, but none that are included in options to set.public Control addItem(Control item, String tabName, String longName)
MultiPanel
addItem
in interface MultiPanel
public void onControlEvent(ControlEvent ev)
onControlEvent
in class Control
public Card addCard(Control toAdd, String cardName, String longCardName, int cardOptionsToSet, int cardOptionsToClear)
addCard
in interface MultiCardPanel
toAdd
- The item to be addedcardName
- The name to appear on the tab.longName
- A longer descriptive name for the tab. If this is null it will be set to tabName.cardOptionsToSet
- any combination of the OPTION_XXX values. These will be set before adding and then restored
to original condition after.cardOptionsToClear
- any combination of the OPTION_XXX values. These will be cleared before adding and then restored
to original condition after.public long modifyAndSaveCardOptions(int optionsToSet, int optionsToClear)
modifyAndSaveCardOptions
in interface MultiCardPanel
optionsToSet
- the option bits to set - any of the OPTION_XXX values, but none that are included in options to clear.optionsToClear
- the option bits to clear - any of the OPTION_XXX values, but none that are included in options to set.public int restoreCardOptions(long savedOptions)
restoreCardOptions
in interface MultiCardPanel
savedOptions
- the value returned by modifyAndSaveCardOptions().public void updateCard(Card card)
MultiCardPanel
updateCard
in interface MultiCardPanel