|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.nwoods.jgo.JGoView
com.nwoods.jgo.JGoPalette
A simple view holding objects that can be dragged into another view.
A JGoPalette's document is not Modifiable, so users cannot move or delete any of the items that are being displayed. The palette's grid determines the spacing of the items, as determined by the layoutItems method.
| Nested Class Summary |
| Nested classes inherited from class com.nwoods.jgo.JGoView |
JGoView.JGoViewCanvas |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
static int |
OrientationHorizontal
Horizontally oriented layout, with a horizontal scroll bar. |
static int |
OrientationVertical
Vertically oriented layout, with a vertical scroll bar. |
| Fields inherited from class com.nwoods.jgo.JGoView |
ChangedDimensions, ChangedOrigin, ChangedPen, ChangedSnapMove, ChangedSnapResize, ChangedSpot, ChangedStyle, DebugEvents, EventMouseDown, EventMouseMove, EventMouseUp, GridCross, GridDot, GridInvisible, GridLine, MouseStateAction, MouseStateCreateLink, MouseStateCreateLinkFrom, MouseStateDragBoxSelection, MouseStateLast, MouseStateMove, MouseStateNone, MouseStateResize, MouseStateSelection, NoSnap, SnapAfter, SnapJump |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JGoPalette()
Create a JGoPalette that is initially empty. |
|
| Method Summary | |
void |
addNotify()
Call layoutItems when the view is realized. |
void |
autoscroll(java.awt.Point location)
Disable autoscrolling. |
void |
documentChanged(JGoDocumentEvent evt)
Call layoutItems when items are added or removed from this palette's document. |
void |
doLayout()
call layoutItems when the view changes shape. |
java.awt.Dimension |
getMinimumSize()
Limit the dimensions of this palette window. |
int |
getOrientation()
This value will be either OrientationVertical (the default), or OrientationHorizontal. |
java.awt.Dimension |
getPreferredSize()
Limit the dimensions of this palette window. |
boolean |
getSingleRowCol()
Returns true if the items in the palette will be layout out in a single row if a horizontal layout, or a single column if a horizontal layout. |
boolean |
isShowSampleItems()
Returns true if sample items are being shown in the palette. |
void |
layoutItems()
Position all of the items, according to the orientation and grid, without overlapping. |
void |
onGridChange(int what)
Call layoutItems when the grid changes. |
JGoObject |
pickObject(java.awt.Point pointToCheck,
boolean selectableOnly)
Disable picking any view object. |
void |
setOrientation(int o)
This value determines how the layoutItems method positions the items in this palette and how the user may be able to scroll the window. |
void |
setShowSampleItems(boolean b)
This value determines whether the palette will be populated with some sample nodes or not. |
void |
setSingleRowCol(boolean b)
This value determines whether items in the palette will be layout out in a single row if a horizontal layout, or a single column if a horizontal layout. |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int OrientationVertical
public static final int OrientationHorizontal
| Constructor Detail |
public JGoPalette()
| Method Detail |
public int getOrientation()
public void setOrientation(int o)
When the value is OrientationVertical, the layoutItems method will fill each row of items before adding a new row. There is a vertical scroll bar if needed, but no horizontal scroll bar. When the value is OrientationHorizontal, the layoutItems method will position items in columns, and there is no vertical scroll bar.
Calling this method will make sure the one appropriate scrollbar exists-- for example, for OrientationVertical, there will be a VerticalScrollBar and no HorizontalScrollBar.
public void setSingleRowCol(boolean b)
When the value is true, the items will be layed out in a single row or column. When the value is false, the as many items as will fit will be placed in each row or column of the palette.
public boolean getSingleRowCol()
public void setShowSampleItems(boolean b)
When the value is set to true, the palette is populated with sample elements if they have not already been added. When the value is set to false, the sample items that have been previously added to the palette (if any) are removed.
public boolean isShowSampleItems()
public void layoutItems()
public void documentChanged(JGoDocumentEvent evt)
documentChanged in interface JGoDocumentListenerdocumentChanged in class JGoViewevt - the document event, including the hint type, any flags, and any relevant objectpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class JGoViewpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class JGoViewpublic void addNotify()
addNotify in class JGoViewpublic void doLayout()
doLayout in class JGoViewpublic void onGridChange(int what)
onGridChange in class JGoViewwhat - the aspect of the grid that has changed
public JGoObject pickObject(java.awt.Point pointToCheck,
boolean selectableOnly)
pickObject in interface JGoObjectCollectionpickObject in class JGoViewpointToCheck - the point under which to find the objectselectableOnly - if true, consider only selectable objectspublic void autoscroll(java.awt.Point location)
autoscroll in interface java.awt.dnd.Autoscrollautoscroll in class JGoViewlocation - a point in the canvas, not in this view component,
(nor in the document).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||