|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--org.comedia.db.view.CTableBox
Implements a table entity box on database schemas.
Usage examples:
String[] fields = {"Field1", "Field2", "Field3", "Field4", "Field5", "Field6"}; CTableBox table = new CTableBox(); table.setLocation(50, 50); table.setTitle("The Table"); table.setFields(fields);
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
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.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CTableBox()
Creates this table box with default properties. |
Method Summary | |
void |
addLink(CTableLink link)
Adds new link to this table. |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Performs event when fields list scroller is changed. |
void |
borderMouseDragged(java.awt.event.MouseEvent e)
Performs event when mouse is dragged over the border of this table box. |
void |
borderMouseMoved(java.awt.event.MouseEvent e)
Performs event when mouse is moved over the border of this table box. |
void |
clearLinks()
Clears all related links. |
void |
focusGained(java.awt.event.FocusEvent e)
Performs event when this table box gets a focus. |
void |
focusLost(java.awt.event.FocusEvent e)
Performs event when this table box lost a focus. |
java.lang.Object[] |
getFields()
Gets the current table fields list. |
int |
getItemPos(int index)
Gets Y position of the specified field in screen coordinates. |
java.lang.String |
getTitle()
Gets the table box title. |
void |
labelMouseDragged(java.awt.event.MouseEvent e)
Performs event when mouse is dragged over the label of this table box. |
static void |
main(java.lang.String[] args)
Runs a standalone test application. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Performs event when mouse is clicked on the component. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Performs event when mouse is dragged over the component. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Performs event when mouse is entered to the component. |
void |
mouseExited(java.awt.event.MouseEvent e)
Performs event when mouse is exited from the component. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Performs event when mouse is moved over the component. |
void |
mousePressed(java.awt.event.MouseEvent e)
Performs event when mouse is pressed on the component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Performs event when mouse is released on the component. |
void |
paint(java.awt.Graphics g)
Paints this table box. |
void |
removeLink(CTableLink link)
Removes a link from this table. |
void |
setFields(java.lang.Object[] fields)
Sets table fields list. |
void |
setTitle(java.lang.String title)
Sets new table box title. |
void |
updateLinks()
Updates all related links. |
void |
updateNewLinks()
Updates new related links. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CTableBox()
Method Detail |
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- a new table box title.public java.lang.Object[] getFields()
public void setFields(java.lang.Object[] fields)
fields
- an array of table fieldspublic void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
e
- an object which described occured event.public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
e
- an object which described occured event.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- an object which described occured event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
e
- an object which described occured event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- an object which described occured event.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- an object which described occured event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- an object which described occured event.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- an object which described occured event.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- an object which described occured event.public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged
in interface java.awt.event.AdjustmentListener
e
- an object which described occured event.public void borderMouseMoved(java.awt.event.MouseEvent e)
e
- an object which described occured event.public void borderMouseDragged(java.awt.event.MouseEvent e)
e
- an object which described occured event.public void labelMouseDragged(java.awt.event.MouseEvent e)
e
- an object which described occured event.public void addLink(CTableLink link)
link
- a link to add.public void clearLinks()
public void removeLink(CTableLink link)
link
- a link to remove.public void updateLinks()
public void updateNewLinks()
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
g
- the current graphics context.public int getItemPos(int index)
index
- an index of a field.public static void main(java.lang.String[] args)
args
- a command line arguments.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |