Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide.inspector.util.table
Class RwiElementTableRemoverButton

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Container
                  |
                  +--javax.swing.JComponent
                        |
                        +--javax.swing.AbstractButton
                              |
                              +--javax.swing.JButton
                                    |
                                    +--com.togethersoft.openapi.ide.inspector.util.table.RwiElementTableRemoverButton

public class RwiElementTableRemoverButton
extends JButton
implements ActionListener, ListSelectionListener

Represents "Remove" button for RwiElementTable. Suited to remove a row from a JTable.

Author:
  TogetherSoft

Inner classes inherited from class javax.swing.JButton
`JButton.AccessibleJButton`

Inner classes inherited from class javax.swing.AbstractButton
`AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener`

Inner classes inherited from class javax.swing.JComponent
`JComponent.AccessibleJComponent`

Inner classes inherited from class java.awt.Container
`Container.AccessibleAWTContainer`

Inner classes inherited from class java.awt.Component
`Component.AccessibleAWTComponent`

Field Summary
`protected RwiElementsComponent` | `myRwiElementsComponent`
`protected boolean` | `mySelectNextAfterRemoval`
`protected JTable` | `myTable`

Fields inherited from class javax.swing.AbstractButton
`MODEL_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, BORDER_PAINTED_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, model, changeListener, actionListener, itemListener, changeEvent`

Fields inherited from class javax.swing.JComponent
`ui, listenerList, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, accessibleContext`

Fields inherited from class java.awt.Component
`TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT`

Constructor Summary
`RwiElementTableRemoverButton(String title, JTable table, RwiElementsComponent rwiElementsComponent)` Constructs this new button.
`RwiElementTableRemoverButton(String title, JTable table, RwiElementsComponent rwiElementsComponent, boolean selectNextAfterRemoval)` Constructs this new button.

Method Summary
`void` | `actionPerformed(ActionEvent e)` Called by action listsners when action on this button is perfomed.
`protected boolean` | `canDelete(RwiElement toBeDeleted)` Checks whether it is possible to delete certain row.
`protected void` | `doDelete(RwiElement toBeDeleted)` Deletes certain row.
`protected RwiElement` | `getSelectedRwiElement()` Return selected RwiElement.
`void` | `valueChanged(ListSelectionEvent e)` Called by list selection listsners when value of row is changed.

Methods inherited from class javax.swing.JButton
`updateUI, getUIClassID, isDefaultButton, isDefaultCapable, setDefaultCapable, removeNotify, configurePropertiesFromAction, paramString, getAccessibleContext`

Methods inherited from class javax.swing.AbstractButton
`getText, setText, isSelected, setSelected, doClick, doClick, setMargin, getMargin, getIcon, setIcon, getPressedIcon, setPressedIcon, getSelectedIcon, setSelectedIcon, getRolloverIcon, setRolloverIcon, getRolloverSelectedIcon, setRolloverSelectedIcon, getDisabledIcon, setDisabledIcon, getDisabledSelectedIcon, setDisabledSelectedIcon, getVerticalAlignment, setVerticalAlignment, getHorizontalAlignment, setHorizontalAlignment, getVerticalTextPosition, setVerticalTextPosition, getHorizontalTextPosition, setHorizontalTextPosition, checkHorizontalKey, checkVerticalKey, setActionCommand, getActionCommand, setAction, getAction, createActionPropertyChangeListener, isBorderPainted, setBorderPainted, paintBorder, isFocusPainted, setFocusPainted, isContentAreaFilled, setContentAreaFilled, isRolloverEnabled, setRolloverEnabled, getMnemonic, setMnemonic, setMnemonic, isFocusTraversable, getModel, setModel, getUI, setUI, addChangeListener, removeChangeListener, fireStateChanged, addActionListener, removeActionListener, createChangeListener, fireActionPerformed, fireItemStateChanged, createActionListener, createItemListener, setEnabled, getLabel, setLabel, addItemListener, removeItemListener, getSelectedObjects, init, imageUpdate`

Methods inherited from class javax.swing.JComponent
`setUI, getComponentGraphics, paintComponent, paintChildren, update, paint, printAll, print, printComponent, printChildren, printBorder, isPaintingTile, isFocusCycleRoot, isManagingFocus, setNextFocusableComponent, getNextFocusableComponent, setRequestFocusEnabled, isRequestFocusEnabled, requestFocus, grabFocus, setVerifyInputWhenFocusTarget, getVerifyInputWhenFocusTarget, setPreferredSize, getPreferredSize, setMaximumSize, getMaximumSize, setMinimumSize, getMinimumSize, isMinimumSizeSet, isPreferredSizeSet, isMaximumSizeSet, contains, setBorder, getBorder, getInsets, getInsets, getAlignmentY, setAlignmentY, getAlignmentX, setAlignmentX, setInputVerifier, getInputVerifier, getGraphics, setDebugGraphicsOptions, getDebugGraphicsOptions, registerKeyboardAction, registerKeyboardAction, unregisterKeyboardAction, getRegisteredKeyStrokes, getConditionForKeyStroke, getActionForKeyStroke, resetKeyboardActions, setInputMap, getInputMap, getInputMap, setActionMap, getActionMap, requestDefaultFocus, setVisible, hide, setForeground, setBackground, setFont, processFocusEvent, processComponentKeyEvent, processKeyEvent, processKeyBinding, setToolTipText, getToolTipText, getToolTipText, getToolTipLocation, createToolTip, scrollRectToVisible, setAutoscrolls, getAutoscrolls, processMouseMotionEvent, enable, disable, getClientProperty, putClientProperty, isLightweightComponent, reshape, getBounds, getSize, getLocation, getX, getY, getWidth, getHeight, hasFocus, isOpaque, setOpaque, computeVisibleRect, getVisibleRect, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, fireVetoableChange, addVetoableChangeListener, removeVetoableChangeListener, getTopLevelAncestor, addAncestorListener, removeAncestorListener, getListeners, addNotify, repaint, repaint, revalidate, isValidateRoot, isOptimizedDrawingEnabled, paintImmediately, paintImmediately, setDoubleBuffered, isDoubleBuffered, getRootPane`

Methods inherited from class java.awt.Container
`getComponentCount, countComponents, getComponent, getComponents, insets, add, add, add, add, add, addImpl, remove, remove, removeAll, getLayout, setLayout, doLayout, layout, invalidate, validate, validateTree, preferredSize, minimumSize, paintComponents, printComponents, addContainerListener, removeContainerListener, processEvent, processContainerEvent, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list`

Methods inherited from class java.awt.Component
`getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getGraphicsConfiguration, getTreeLock, getToolkit, isValid, isDisplayable, isVisible, isShowing, isEnabled, enable, enableInputMethods, show, show, getForeground, getBackground, getFont, getLocale, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, setBounds, isLightweight, getFontMetrics, setCursor, getCursor, paintAll, repaint, repaint, repaint, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, inside, contains, dispatchEvent, postEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, getInputContext, enableEvents, disableEvents, coalesceEvents, processComponentEvent, processMouseEvent, processInputMethodEvent, processHierarchyEvent, processHierarchyBoundsEvent, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, transferFocus, nextFocus, add, remove, toString, list, list, list, setComponentOrientation, getComponentOrientation`

Methods inherited from class java.lang.Object
`getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize`

Field Detail

### myRwiElementsComponent

    protected RwiElementsComponent myRwiElementsComponent

### mySelectNextAfterRemoval

    protected boolean mySelectNextAfterRemoval

### myTable

    protected JTable myTable

Constructor Detail

### RwiElementTableRemoverButton

    public RwiElementTableRemoverButton(String title, JTable table, RwiElementsComponent rwiElementsComponent)

  Constructs this new button. After removal the next row will be selected.
  Parameters:
    title - Button title
    table - JTable from which rows will be removed
    rwiElementsComponent - RwiElementsComponent which will be removed

### RwiElementTableRemoverButton

    public RwiElementTableRemoverButton(String title, JTable table, RwiElementsComponent rwiElementsComponent, boolean selectNextAfterRemoval)

  Constructs this new button.
  Parameters:
    title - Button title
    table - JTable from which rows will be removed
    rwiElementsComponent - RwiElementsComponent which will be removed
    selectNextAfterRemoval - If true than after removal the next row will be selected

Method Detail

### actionPerformed

    public void actionPerformed(ActionEvent e)

  Called by action listsners when action on this button is perfomed.
  Parameters:
    e - ActionEvent

### canDelete

    protected boolean canDelete(RwiElement toBeDeleted)

  Checks whether it is possible to delete certain row.
  Parameters:
    toBeDeleted - RwiElement to be checked
  Returns: true of so, false otherwise

### doDelete

    protected void doDelete(RwiElement toBeDeleted)

  Deletes certain row.
  Parameters:
    toBeDeleted - RwiElement to be deleted

### getSelectedRwiElement

    protected RwiElement getSelectedRwiElement()

  Return selected RwiElement.
  Returns: selected RwiElement, null if nothing is selected

### valueChanged

    public void valueChanged(ListSelectionEvent e)

  Called by list selection listsners when value of row is changed.
  Parameters:
    e - ActionEvent

Association Links

to Class javax.swing.JTable

to Class com.togethersoft.openapi.ide.inspector.util.table.RwiElementsComponent

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD