Methods from javax.swing.JComponent: |
---|
_paintImmediately, access$100, access$200, addAncestorListener, addNotify, addVetoableChangeListener, alwaysOnTop, checkIfChildObscuredBySibling, clientPropertyChanged, compWriteObjectNotify, componentInputMapChanged, computeVisibleRect, computeVisibleRect, contains, createToolTip, disable, dndDone, dropLocationForPoint, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getGraphicsInvoked, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getManagingFocusBackwardTraversalKeys, getManagingFocusForwardTraversalKeys, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getWriteObjCounter, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPainting, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintForceDoubleBuffered, paintImmediately, paintImmediately, paintToOffscreen, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, rectangleIsObscured, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, safelyGetGraphics, safelyGetGraphics, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setDropLocation, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setUIProperty, setVerifyInputWhenFocusTarget, setVisible, setWriteObjCounter, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, update, updateUI |
Methods from java.awt.Component: |
---|
access$000, access$100, action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, adjustListeningChildrenOnParent, applyComponentOrientation, areFocusTraversalKeysSet, areInputMethodsEnabled, autoProcessMouseWheel, autoTransferFocus, bounds, canBeFocusOwner, checkGD, checkImage, checkImage, checkWindowClosingException, clearCurrentFocusCycleRootOnHide, clearMostRecentFocusOwnerOnHide, coalesceEvents, constructComponentName, contains, contains, containsFocus, countHierarchyMembers, createBufferStrategy, createBufferStrategy, createHierarchyEvents, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, dispatchMouseWheelToAncestor, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, eventTypeEnabled, findUnderMouseInWindow, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackBuffer, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getBoundsOp, getBufferStrategy, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getContainingWindow, getContainingWindow, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFocusTraversalKeys_NoIDCheck, getFont, getFontMetrics, getFont_NoClientCode, getForeground, getGraphics, getGraphicsConfiguration, getGraphicsConfiguration_NoClientCode, getGraphics_NoClientCode, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getLocationOnScreen_NoTreeLock, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getNativeContainer, getParent, getParent_NoClientCode, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initializeFocusTraversalKeys, inside, invalidate, isBackgroundSet, isCoalescingEnabled, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusTraversableOverridden, isFocusable, isFontSet, isForegroundSet, isInstanceOf, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isRecursivelyVisible, isSameOrAncestorOf, isShowing, isValid, isVisible, isVisible_NoClientCode, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, nextFocusHelper, numListening, paint, paintAll, paintHeavyweightComponents, paramString, pointRelativeToComponent, postEvent, postNextFocusHelper, postsOldMouseEvents, preNextFocusHelper, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusHelper, requestFocusHelper, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setBoundsOp, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusTraversalKeys_NoIDCheck, setFocusable, setFont, setForeground, setGCFromPeer, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setRequestFocusController, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, updateCursorImmediately, validate |
Method from org.apache.jmeter.protocol.ldap.config.gui.LDAPArgumentsPanel Detail: |
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals(DELETE)) {
deleteArgument();
} else if (action.equals(ADD)) {
addArgument();
}
}
Invoked when an action occurs. This implementation supports the add and
delete buttons. |
protected void addArgument() {
// If a table cell is being edited, we should accept the current value
// and stop the editing before adding a new row.
stopTableEditing();
tableModel.addRow(makeNewLDAPArgument());
// Enable DELETE (which may already be enabled, but it won't hurt)
delete.setEnabled(true);
// Highlight (select) the appropriate row.
int rowToSelect = tableModel.getRowCount() - 1;
table.setRowSelectionInterval(rowToSelect, rowToSelect);
}
Add a new argument row to the table. |
protected void checkDeleteStatus() {
// Disable DELETE if there are no rows in the table to delete.
if (tableModel.getRowCount() == 0) {
delete.setEnabled(false);
} else {
delete.setEnabled(true);
}
}
Enable or disable the delete button depending on whether or not there is
a row to be deleted. |
public void clear() {
tableModel.clearData();
}
Clear all rows from the table. T.Elanjchezhiyan(chezhiyan@siptech.co.in) |
public void configure(TestElement el) {
super.configure(el);
if (el instanceof LDAPArguments) {
tableModel.clearData();
PropertyIterator iter = ((LDAPArguments) el).iterator();
while (iter.hasNext()) {
LDAPArgument arg = (LDAPArgument) iter.next().getObjectValue();
tableModel.addRow(arg);
}
}
checkDeleteStatus();
}
A newly created component can be initialized with the contents of a Test
Element object by calling this method. The component is responsible for
querying the Test Element object for the relevant information to display
in its GUI. |
public TestElement createTestElement() {
LDAPArguments args = new LDAPArguments();
modifyTestElement(args);
// TODO: Why do we clone the return value? This is the only reference
// to it (right?) so we shouldn't need a separate copy.
return (TestElement) args.clone();
}
|
protected void deleteArgument() {
// If a table cell is being edited, we must cancel the editing before
// deleting the row
if (table.isEditing()) {
TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
cellEditor.cancelCellEditing();
}
int rowSelected = table.getSelectedRow();
if (rowSelected >= 0) {
tableModel.removeRow(rowSelected);
tableModel.fireTableDataChanged();
// Disable DELETE if there are no rows in the table to delete.
if (tableModel.getRowCount() == 0) {
delete.setEnabled(false);
}
// Table still contains one or more rows, so highlight (select)
// the appropriate one.
else {
int rowToSelect = rowSelected;
if (rowSelected >= tableModel.getRowCount()) {
rowToSelect = rowSelected - 1;
}
table.setRowSelectionInterval(rowToSelect, rowToSelect);
}
}
}
Remove the currently selected argument from the table. |
protected JButton getAddButton() {
return add;
}
Get the button used to add rows to the table. |
protected JButton getDeleteButton() {
return delete;
}
Get the button used to delete rows from the table. |
public String getLabelResource() {
return "ldapext_sample_title"; // $NON-NLS-1$
}
|
public Collection getMenuCategories() {
return null;
}
This is the list of menu categories this gui component will be available
under. The LDAPArgumentsPanel is not intended to be used as a standalone
component, so this inplementation returns null. |
protected JTable getTable() {
return table;
}
Get the table used to enter arguments. |
protected JLabel getTableLabel() {
return tableLabel;
}
Get the title label for this component. |
protected void initializeTableModel() {
tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES[0], COLUMN_NAMES[1], COLUMN_NAMES[2] },
LDAPArgument.class,
new Functor[] { new Functor("getName"), new Functor("getValue"), new Functor("getOpcode") },
new Functor[] { new Functor("setName"), new Functor("setValue"), new Functor("setOpcode") },
new Class[] { String.class, String.class, String.class });
}
Initialize the table model used for the arguments table. |
protected Component makeLabelPanel() {
JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
labelPanel.add(tableLabel);
return labelPanel;
}
Create a panel containing the title label for the table. |
protected Object makeNewLDAPArgument() {
return new LDAPArgument("", "", "");
}
Create a new LDAPArgument object. |
public void modifyTestElement(TestElement args) {
stopTableEditing();
Iterator modelData = tableModel.iterator();
LDAPArguments arguments = null;
if (args instanceof LDAPArguments) {
arguments = (LDAPArguments) args;
arguments.clear();
while (modelData.hasNext()) {
LDAPArgument arg = (LDAPArgument) modelData.next();
arg.setMetaData("=");
arguments.addArgument(arg);
}
}
this.configureTestElement(args);
}
|
protected void sizeColumns(JTable _table) {
}
Resize the table columns to appropriate widths. |
public static boolean testFunctors() {
LDAPArgumentsPanel instance = new LDAPArgumentsPanel();
instance.initializeTableModel();
return instance.tableModel.checkFunctors(null,instance.getClass());
}
|