'STRAP:multiple sequence alignments '

charite.christo
Class ChTableLayout

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by charite.christo.ChPanel
                      extended by charite.christo.ChTableLayout
All Implemented Interfaces:
ChRunnable, PaintHook, ProcessEv, TooltipProvider, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable, javax.swing.table.TableCellRenderer

public final class ChTableLayout
extends ChPanel
implements ChRunnable, ProcessEv, javax.swing.table.TableCellRenderer, TooltipProvider, PaintHook

Container that arranges components horizontally. A header allows dragging of columns and resizing like in a JTable.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static java.lang.String COLUMN_ADDED
           
static java.lang.String COLUMN_REMOVED
           
static java.lang.String KEY_HEIGHT_SOUTH_PANEL
           
static java.lang.String KEY_OFFSET_COMPONENT
           
 
Fields inherited from class charite.christo.ChPanel
KEY_REPRESENT_COMPONENT
 
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 charite.christo.ChRunnable
APPEND, COLUMN_TITLE, DOWNLOAD_FINISHED, GET_PANEL, ICON, INTERPRET_LINE, IS_DRAG4XY, ITEM_TEXT, MODIFY_RENDERER_COMPONENT, PROGRESS, REPAINT_CURSOR, SAY_DOWNLOADING, SET_ICON_IMAGE, SET_TREE_VALUE, SHOW_IN_FRAME, TAB_TEXT, TIP_TEXT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ChTableLayout(long options)
           
 
Method Summary
 void addColumn(int opt, java.lang.Object p)
           
 void chColSize(int column, int newWidth0, int oldWidth)
           
 int columnWidth(int i)
           
 java.lang.Object[] getAllComponents()
           
 int getColumnCount()
           
 ChJTable getJTable()
           
 java.awt.Dimension getPreferredSize()
           
 int getSelectedIndex()
           
 java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
           
 javax.swing.table.JTableHeader getTableHeader()
           
 void layoutColumns()
           
 void narrowAllOthers(java.lang.Object c, int narrowWidth)
           
 boolean paintHook(javax.swing.JComponent c, java.awt.Graphics g, boolean after)
           
 void processEv(java.awt.AWTEvent ev)
           
 java.lang.String provideTip(java.lang.Object objOrEv)
           
 void removeColumn(java.lang.Object... pp)
           
 java.lang.Object run(java.lang.String id, java.lang.Object arg)
           
 void setColWidth(boolean hard, int col, int w0)
           
 void setTitle(int col, java.lang.String title)
           
 java.lang.Thread thread_setColWidth(boolean hard, int col, int w0)
           
 
Methods inherited from class charite.christo.ChPanel
cp, getDndDateien, getMaximumSize, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getToolTipLocation, getToolTipText, getWhenPainted, invalidate, isAlreadyPainted, isEnabled, isShowing, isValidateRoot, paint, paintChildren, paintComponent, processEvent, removeAll
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, 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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, 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, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, setComponentOrientation, 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
 

Field Detail

COLUMN_ADDED

public static final java.lang.String COLUMN_ADDED
See Also:
Constant Field Values

COLUMN_REMOVED

public static final java.lang.String COLUMN_REMOVED
See Also:
Constant Field Values

KEY_OFFSET_COMPONENT

public static final java.lang.String KEY_OFFSET_COMPONENT
See Also:
Constant Field Values

KEY_HEIGHT_SOUTH_PANEL

public static final java.lang.String KEY_HEIGHT_SOUTH_PANEL
See Also:
Constant Field Values
Constructor Detail

ChTableLayout

public ChTableLayout(long options)
Method Detail

getJTable

public ChJTable getJTable()

getSelectedIndex

public int getSelectedIndex()

processEv

public void processEv(java.awt.AWTEvent ev)
Specified by:
processEv in interface ProcessEv
See Also:
EvAdapter

columnWidth

public int columnWidth(int i)

getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                        java.lang.Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Specified by:
getTableCellRendererComponent in interface javax.swing.table.TableCellRenderer

provideTip

public java.lang.String provideTip(java.lang.Object objOrEv)
Specified by:
provideTip in interface TooltipProvider

paintHook

public boolean paintHook(javax.swing.JComponent c,
                         java.awt.Graphics g,
                         boolean after)
Specified by:
paintHook in interface PaintHook
after - This method is called once before and once after super.paintComponent.
Returns:
means do not call super.paintComponent

getTableHeader

public javax.swing.table.JTableHeader getTableHeader()

setTitle

public void setTitle(int col,
                     java.lang.String title)

addColumn

public void addColumn(int opt,
                      java.lang.Object p)

removeColumn

public void removeColumn(java.lang.Object... pp)

getAllComponents

public java.lang.Object[] getAllComponents()

layoutColumns

public void layoutColumns()

run

public java.lang.Object run(java.lang.String id,
                            java.lang.Object arg)
Specified by:
run in interface ChRunnable

getColumnCount

public int getColumnCount()

narrowAllOthers

public void narrowAllOthers(java.lang.Object c,
                            int narrowWidth)

chColSize

public void chColSize(int column,
                      int newWidth0,
                      int oldWidth)

thread_setColWidth

public java.lang.Thread thread_setColWidth(boolean hard,
                                           int col,
                                           int w0)

setColWidth

public void setColWidth(boolean hard,
                        int col,
                        int w0)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class ChPanel

'STRAP:multiple sequence alignments '

'The most important classes are StrapAlign, Protein and StrapEvent.'