public class FilterBuilder
extends javax.swing.JFrame
implements java.awt.event.WindowListener, java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.dnd.DragGestureListener, java.awt.dnd.DragSourceListener, java.awt.dnd.DropTargetListener, java.awt.datatransfer.ClipboardOwner
ToDo:
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR| 构造器和说明 |
|---|
FilterBuilder()
Create an FilterBuilder programming environment.
|
FilterBuilder(java.lang.String title)
Creates a new instance of an FilterBuilder environment with the given title.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handles menu and toolbar item choices.
|
void |
addFilter(javax.swing.JMenu menu,
javax.swing.JToolBar toolbar,
java.lang.String class_name)
Add a filter to the GUI.
|
void |
collapseAction()
The action to take when "Collapse" menu chosen.
|
void |
collapseAllAction()
The action to take when "Collapse" menu chosen.
|
void |
deleteSelection()
Delete the current selection set from the filters in the GUI.
|
void |
dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
This message goes to DragSourceListener,
informing it that the dragging has ended.
|
void |
dragEnter(java.awt.dnd.DragSourceDragEvent event)
This message goes to DragSourceListener,
informing it that the dragging has entered the DropSite.
|
void |
dragEnter(java.awt.dnd.DropTargetDragEvent event)
This is invoked when you are dragging over the DropSite.
|
void |
dragExit(java.awt.dnd.DragSourceEvent event)
This message goes to DragSourceListener, informing it that the dragging
has exited the DropSite.
|
void |
dragExit(java.awt.dnd.DropTargetEvent event)
Thi ss invoked when you are exit the DropSite without dropping.
|
void |
dragGestureRecognized(java.awt.dnd.DragGestureEvent event)
A DragGestureRecognizer has detected a platform-dependent drag initiating gesture.
|
void |
dragOver(java.awt.dnd.DragSourceDragEvent event)
This message goes to DragSourceListener, informing it that the dragging is currently
ocurring over the DropSite.
|
void |
dragOver(java.awt.dnd.DropTargetDragEvent event)
This is invoked when a drag operation is going on.
|
void |
drop(java.awt.dnd.DropTargetDropEvent event)
This is invoked when a drop has occurred.
|
void |
dropActionChanged(java.awt.dnd.DragSourceDragEvent event)
This is invoked when the user changes the dropAction.
|
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
This is invoked if the user modifies the current drop gesture.
|
void |
expandAction()
The action to take when "Expand" menu chosen.
|
void |
expandAllAction()
The action to take when "Expand All" menu chosen.
|
Filter[] |
getFilters()
Retrieve the top level filters in the main window.
|
boolean |
isSingleSelection()
Check if there is more than one filter selected.
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Notifies this object that it is no longer the owner
of the contents of the clipboard.
|
static void |
main(java.lang.String[] args)
The entry point for this application.
|
javax.swing.JButton |
makeFilterButton(java.lang.String class_name)
Creates a new button for the given class.
|
void |
mouseClicked(java.awt.event.MouseEvent event)
Invoked when the mouse has been clicked on a component.
|
void |
mouseDragged(java.awt.event.MouseEvent event)
Mouse drag notification.
|
void |
mouseEntered(java.awt.event.MouseEvent event)
Invoked when the mouse enters a component.
|
void |
mouseExited(java.awt.event.MouseEvent event)
Invoked when the mouse exits a component.
|
void |
mouseMoved(java.awt.event.MouseEvent event)
Mouse move notification.
|
void |
mousePressed(java.awt.event.MouseEvent event)
Invoked when a mouse button has been pressed on a component.
|
void |
mouseReleased(java.awt.event.MouseEvent event)
Invoked when a mouse button has been released on a component.
|
void |
open(java.lang.String name)
Read a workspace from file.
|
void |
relayout()
Redo the layout.
|
void |
save(java.lang.String name)
Save the workspace contents to file.
|
java.lang.String |
serializeSelection()
Serialize the current selection set.
|
void |
setExpanded(Filter[] filters,
boolean expanded,
boolean recursive)
Expand or collapse filters, possibly recursively.
|
void |
setupDropTargets(Filter[] filters)
Set up drop targets.
|
void |
setupMouseListeners(Filter[] filters)
Set up mouse listeners.
|
void |
showContextMenu(java.awt.event.MouseEvent event)
Show a pop up context menu.
|
void |
windowActivated(java.awt.event.WindowEvent event)
Invoked when the window is set to be the user's
active window, which means the window (or one of its
subcomponents) will receive keyboard events.
|
void |
windowClosed(java.awt.event.WindowEvent event)
Invoked when a window has been closed as the result
of calling dispose on the window.
|
void |
windowClosing(java.awt.event.WindowEvent event)
Handles window closing event.
|
void |
windowDeactivated(java.awt.event.WindowEvent event)
Invoked when a window is no longer the user's active
window, which means that keyboard events will no longer
be delivered to the window or its subcomponents.
|
void |
windowDeiconified(java.awt.event.WindowEvent event)
Invoked when a window is changed from a minimized
to a normal state.
|
void |
windowIconified(java.awt.event.WindowEvent event)
Invoked when a window is changed from a normal to a
minimized state.
|
void |
windowOpened(java.awt.event.WindowEvent event)
Invoked the first time a window is made visible.
|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, 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, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic FilterBuilder()
public FilterBuilder(java.lang.String title)
title - the title for the new frame.FilterBuilder()public javax.swing.JButton makeFilterButton(java.lang.String class_name)
class_name - The name of the Filter class.public void addFilter(javax.swing.JMenu menu,
javax.swing.JToolBar toolbar,
java.lang.String class_name)
menu - The menu to add the filter to.toolbar - The toolbar to add the filter to.class_name - The class name for the filter wrapper.
From the wrapper, the NodeFilter, description and icon can be obtained.public void save(java.lang.String name)
name - The name of the file to save it under.public void expandAction()
public void collapseAction()
public void expandAllAction()
public void collapseAllAction()
public void setupMouseListeners(Filter[] filters)
this up to listen to each command
in the list as a MouseListener.
Recursively descends the tree adding to all contained elements also.filters - The container with commands in it.public void setupDropTargets(Filter[] filters)
filters - The container with filters in it.public void setExpanded(Filter[] filters, boolean expanded, boolean recursive)
filters - The list of filters to expand or collapse.expanded - If true the filters are expanded,
otherwise they are collapsed.recursive - If true the filters are processed
recursively.public Filter[] getFilters()
public void relayout()
public void open(java.lang.String name)
name - The name of the file to open.public void showContextMenu(java.awt.event.MouseEvent event)
event - The mouse event that initiates the popup.public java.lang.String serializeSelection()
public void deleteSelection()
public boolean isSingleSelection()
true if only one filter is selected,
false otherwise.public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked 在接口中 java.awt.event.MouseListenerevent - The mouse clicked event.public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased 在接口中 java.awt.event.MouseListenerevent - The mouse released event.public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered 在接口中 java.awt.event.MouseListenerevent - The mouse entered event.public void mouseExited(java.awt.event.MouseEvent event)
mouseExited 在接口中 java.awt.event.MouseListenerevent - The mouse exited event.public void mousePressed(java.awt.event.MouseEvent event)
mousePressed 在接口中 java.awt.event.MouseListenerevent - The mouse pressed event.public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged 在接口中 java.awt.event.MouseMotionListenerevent - The mouse drag event.public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved 在接口中 java.awt.event.MouseMotionListenerevent - The mouse moved event.public void windowOpened(java.awt.event.WindowEvent event)
windowOpened 在接口中 java.awt.event.WindowListenerevent - The window event.public void windowClosing(java.awt.event.WindowEvent event)
exitApplication().windowClosing 在接口中 java.awt.event.WindowListenerevent - The window event.public void windowClosed(java.awt.event.WindowEvent event)
windowClosed 在接口中 java.awt.event.WindowListenerevent - The window event.public void windowIconified(java.awt.event.WindowEvent event)
windowIconified 在接口中 java.awt.event.WindowListenerevent - The window event.public void windowDeiconified(java.awt.event.WindowEvent event)
windowDeiconified 在接口中 java.awt.event.WindowListenerevent - The window event.public void windowActivated(java.awt.event.WindowEvent event)
windowActivated 在接口中 java.awt.event.WindowListenerevent - The window event.public void windowDeactivated(java.awt.event.WindowEvent event)
windowDeactivated 在接口中 java.awt.event.WindowListenerevent - The window event.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed 在接口中 java.awt.event.ActionListenerevent - The action even that triggers this function.public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
lostOwnership 在接口中 java.awt.datatransfer.ClipboardOwnerclipboard - The clipboard that is no longer owned.contents - The contents which this owner had placed on the clipboard.public void dragGestureRecognized(java.awt.dnd.DragGestureEvent event)
dragGestureRecognized 在接口中 java.awt.dnd.DragGestureListenerevent - The DragGestureEvent describing the gesture that has just occurred.public void dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
dragDropEnd 在接口中 java.awt.dnd.DragSourceListenerevent - Details about the drop event.public void dragEnter(java.awt.dnd.DragSourceDragEvent event)
dragEnter 在接口中 java.awt.dnd.DragSourceListenerevent - Details about the drag event.public void dragExit(java.awt.dnd.DragSourceEvent event)
dragExit 在接口中 java.awt.dnd.DragSourceListenerevent - Details about the drag event.public void dragOver(java.awt.dnd.DragSourceDragEvent event)
dragOver 在接口中 java.awt.dnd.DragSourceListenerevent - Details about the drag event.public void dropActionChanged(java.awt.dnd.DragSourceDragEvent event)
dropActionChanged 在接口中 java.awt.dnd.DragSourceListenerevent - Details about the drop action event.public void dragEnter(java.awt.dnd.DropTargetDragEvent event)
dragEnter 在接口中 java.awt.dnd.DropTargetListenerevent - Details about the drag event.public void dragExit(java.awt.dnd.DropTargetEvent event)
dragExit 在接口中 java.awt.dnd.DropTargetListenerevent - Details about the drag event.public void dragOver(java.awt.dnd.DropTargetDragEvent event)
dragOver 在接口中 java.awt.dnd.DropTargetListenerevent - Details about the drag event.public void drop(java.awt.dnd.DropTargetDropEvent event)
drop 在接口中 java.awt.dnd.DropTargetListenerevent - The drop event.public void dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
dropActionChanged 在接口中 java.awt.dnd.DropTargetListenerevent - Details about the drop action change event.public static void main(java.lang.String[] args)
args - [0] optional URL to operate on.