|
|||||||||
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
javax.swing.JScrollPane
net.sourceforge.nite.gui.textviewer.GridPanel
public class GridPanel
A NITE GUI Element, this class is designed for the display of objects in a grid-like way. It uses PnutsLayout to achieve this. The user specifies the colspan and rowspan of entries using the pnuts scripting language. The gridded entries are displayed on a scrolling pane so that if they are big the user can still inspect all entries. This can display timed elements in reponse to system clock time change notifications by using NTimedLabels
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 javax.swing.ScrollPaneConstants |
---|
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
GridPanel(int cols,
boolean border)
Create a GridPanel with the specified number of columns |
Method Summary | |
---|---|
void |
acceptTimeChange(double systemTime)
Causes the display components which correspond to the specified time to be highlighted This uses the TimeIntervalInterator provided by TimeIntervalMapper to find all the display components for the specified time. |
void |
acceptTimeSpanChange(double start,
double end)
Causes the display components which are in time scope between the specified start and end times to be highlighted NOT YET IMPLEMENTED |
void |
addEntries(java.lang.Object element)
Probably this is no longer needed |
void |
addEntry(int rowspan,
int colspan,
double start,
double end,
java.lang.String position,
javax.swing.JComponent comp)
Adds a display object to the gridded display with the specified row and column set up In the future we may want to extend this so the user can specifiy the other pnuts parameters, but colspan and rowspan seem necessary just now |
void |
addEntry(int rowspan,
int colspan,
java.lang.String position,
javax.swing.JComponent comp)
|
Clock |
getClock()
Return the Clock that is currently syncronising this TimeHandler |
java.lang.Double |
getEndTime(Element obj)
|
int |
getID()
|
double |
getMaxEndTime()
|
double |
getMaxTime()
get the largest end time of any element so far added to this Panel. |
double |
getMinStartTime()
|
java.lang.Double |
getStartTime(Element obj)
|
void |
setBackgroundColour(java.awt.Color c)
|
void |
setClock(Clock c)
Set the Clock to which this TimeHandler is registered |
void |
setID(int i)
|
void |
setTime(double time)
Broadcast a new time. |
void |
setTimeHighlightColor(java.awt.Color color)
Change the Color used for all registered TimeHandlers to highlight times |
void |
setTimeSpan(double start,
double end)
Broadcast a new span to all registered TimeHandlers. |
Methods inherited from class javax.swing.JScrollPane |
---|
createHorizontalScrollBar, createVerticalScrollBar, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GridPanel(int cols, boolean border)
cols
- Method Detail |
---|
public void setBackgroundColour(java.awt.Color c)
public void addEntry(int rowspan, int colspan, double start, double end, java.lang.String position, javax.swing.JComponent comp)
rowspan
- How many rows the component should take upcolspan
- How may columns the component should take upcomp
- The component to be added to the displaypublic void addEntry(int rowspan, int colspan, java.lang.String position, javax.swing.JComponent comp)
public void addEntries(java.lang.Object element)
public void acceptTimeChange(double systemTime)
acceptTimeChange
in interface TimeHandler
TimeHandler.acceptTimeChange(double)
public void setTimeHighlightColor(java.awt.Color color)
TimeHandler
setTimeHighlightColor
in interface TimeHandler
public void setTime(double time)
TimeHandler
setTime
in interface TimeHandler
TimeHandler.setTime(double)
public void acceptTimeSpanChange(double start, double end)
acceptTimeSpanChange
in interface TimeHandler
TimeHandler.acceptTimeSpanChange(double, double)
public void setTimeSpan(double start, double end)
TimeHandler
setTimeSpan
in interface TimeHandler
TimeHandler.setTimeSpan(double, double)
public Clock getClock()
TimeHandler
getClock
in interface TimeHandler
TimeHandler.getClock()
public void setClock(Clock c)
TimeHandler
setClock
in interface TimeHandler
public java.lang.Double getStartTime(Element obj)
public java.lang.Double getEndTime(Element obj)
public double getMinStartTime()
public double getMaxEndTime()
public int getID()
public void setID(int i)
public double getMaxTime()
getMaxTime
in interface TimeHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |