[Htmlparser-cvs] htmlparser/src/org/htmlparser/parserapplications/filterbuilder Filter.java,1.1,1.2
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2005-04-12 11:27:53
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23432/htmlparser/src/org/htmlparser/parserapplications/filterbuilder Modified Files: Filter.java FilterBuilder.java HtmlTreeCellRenderer.java HtmlTreeModel.java SubFilterList.java Log Message: Documentation revamp part two. Index: SubFilterList.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/SubFilterList.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SubFilterList.java 13 Feb 2005 22:45:48 -0000 1.2 --- SubFilterList.java 12 Apr 2005 11:27:42 -0000 1.3 *************** *** 35,50 **** import org.htmlparser.parserapplications.filterbuilder.layouts.VerticalLayoutManager; public class SubFilterList extends JPanel { protected int mExtra = 25; // for now ! protected Component mSpacer; ! protected Filter mHome; protected String mTitle; protected int mMax; --- 35,68 ---- import org.htmlparser.parserapplications.filterbuilder.layouts.VerticalLayoutManager; + /** + * A helper class for lists of filters within filters. + */ public class SubFilterList extends JPanel { + /** + * Padding for the drop target. + */ protected int mExtra = 25; // for now ! ! /** ! * The drop target spacer at the bottom of the list. ! */ protected Component mSpacer; ! ! /** ! * The parent filter wrapper. ! */ protected Filter mHome; + /** + * The textual title for the list. + */ protected String mTitle; + /** + * The number of filters limit. + */ protected int mMax; *************** *** 98,102 **** new EmptyBorder (3,3,3,3))); } ! protected void addSpacer () { --- 116,123 ---- new EmptyBorder (3,3,3,3))); } ! ! /** ! * Stuff a spacer component at the end of the list. ! */ protected void addSpacer () { *************** *** 113,116 **** --- 134,140 ---- } + /** + * Remove the spacer component at the end of the list. + */ protected void removeSpacer () { *************** *** 118,121 **** --- 142,146 ---- mSpacer = null; } + /** * Get the components in which to drop commands. *************** *** 222,225 **** --- 247,255 ---- } + /** + * Check if our maximum number of filters limit has been reached. + * @return <code>true</code> if the sublist can accept one more filter, + * <code>false</code> otherwise. + */ public boolean canAccept () { Index: HtmlTreeCellRenderer.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/HtmlTreeCellRenderer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HtmlTreeCellRenderer.java 13 Feb 2005 20:43:06 -0000 1.1 --- HtmlTreeCellRenderer.java 12 Apr 2005 11:27:42 -0000 1.2 *************** *** 43,57 **** /** ! * @author derrick ! * ! * TODO To change the template for this generated type comment go to ! * Window - Preferences - Java - Code Style - Code Templates */ public class HtmlTreeCellRenderer ! extends ! DefaultTreeCellRenderer ! implements ! TreeCellRenderer { public HtmlTreeCellRenderer () { --- 43,57 ---- /** ! * Renderer for tree view of a NodeList. */ public class HtmlTreeCellRenderer ! extends ! DefaultTreeCellRenderer ! implements ! TreeCellRenderer { + /** + * Create a new tree cell renderer for Nodes. + */ public HtmlTreeCellRenderer () { *************** *** 65,70 **** * This is different from the tag's normal toHtml() method in that it * doesn't process children or end tags, just the initial tag, and ! * it also wraps the tag in something a label would expect. * @see org.htmlparser.Node#toHtml() */ public String toHtml (TagNode tag) --- 65,72 ---- * This is different from the tag's normal toHtml() method in that it * doesn't process children or end tags, just the initial tag, and ! * it also wraps the tag in html a label would expect. * @see org.htmlparser.Node#toHtml() + * @param tag The tag to convert to HTML. + * @return A string suitable for rendering the tag. */ public String toHtml (TagNode tag) *************** *** 113,116 **** --- 115,119 ---- * Control characters are replaced by their equivalent escape * sequence and contents is truncated to 80 characters. + * @param node The node to render. * @return A string representation of the string node. */ *************** *** 155,159 **** /** ! * @see javax.swing.tree.TreeCellRenderer#getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean) */ public Component getTreeCellRendererComponent (JTree tree, Object value, --- 158,171 ---- /** ! * Render the node for the tree cell. ! * @see TreeCellRenderer#getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean) ! * @param tree {@inheritDoc} ! * @param value {@inheritDoc} ! * @param selected {@inheritDoc} ! * @param expanded {@inheritDoc} ! * @param leaf {@inheritDoc} ! * @param row {@inheritDoc} ! * @param hasFocus {@inheritDoc} ! * @return {@inheritDoc} */ public Component getTreeCellRendererComponent (JTree tree, Object value, Index: Filter.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/Filter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Filter.java 13 Feb 2005 20:43:06 -0000 1.1 --- Filter.java 12 Apr 2005 11:27:42 -0000 1.2 *************** *** 217,223 **** // public static byte[] pickle (Object object) ! throws ! IOException { ByteArrayOutputStream bos; --- 217,229 ---- // + /** + * Serialize an object to a byte array. + * @param object The object to be pickled. + * @return The serialized object. + * @exception IOException If the output stream complains (unlikely). + */ public static byte[] pickle (Object object) ! throws ! IOException { ByteArrayOutputStream bos; *************** *** 234,240 **** } public static Object unpickle (byte[] data) ! throws ! IOException, ClassNotFoundException { --- 240,254 ---- } + /** + * Reconstitute a serialized object. + * @param data The pickled object. + * @return The reconstituted object. + * @exception IOException If the input stream complains. + * @exception ClassNotFoundException If the serialized object class cannot + * be located. + */ public static Object unpickle (byte[] data) ! throws ! IOException, ClassNotFoundException { *************** *** 251,254 **** --- 265,275 ---- } + /** + * Serialize a byte array to a String. + * Convert each byte from the serialized object into a couple of hexadecimal + * characters. + * @param data The serialized object as a byte array. + * @return The string representing the serialized object. + */ public static String serialize (byte[] data) { *************** *** 269,272 **** --- 290,298 ---- } + /** + * Convert a sequence of hexadecimal characters back into a byte array. + * @param string The string to convert (must be correct hex characters). + * @return The bytes as an array. + */ public static byte[] deserialize (String string) { *************** *** 283,287 **** --- 309,315 ---- /** * Returns a string serialization of the filters. + * @param filters The list of filters to serialize. * @return A string representation of the filters. + * @exception IOException If serialization fails. */ public static String deconstitute (Filter[] filters) throws IOException *************** *** 303,307 **** --- 331,338 ---- * Returns the filters represented by the string. * @param string The string with serialized node filters. + * @param context The context from which to extract meaningful values + * for GUI choices (which aren't serialized). * @return The filters gleaned from the string. + * @see #wrap */ public static Filter[] reconstitute (String string, Parser context) *************** *** 317,340 **** try { ! while (string.startsWith ("[")) ! { ! index = string.indexOf (']'); ! if (-1 != index) ! { ! code = string.substring (1, index); ! string = string.substring (index + 1); ! object = unpickle (deserialize (code)); ! if (object instanceof NodeFilter) ! { ! filter = wrap ((NodeFilter)object, context); ! if (null != filter) ! vector.addElement (filter); ! } ! else ! break; ! } ! else ! break; ! } } catch (Exception e) --- 348,371 ---- try { ! while (string.startsWith ("[")) ! { ! index = string.indexOf (']'); ! if (-1 != index) ! { ! code = string.substring (1, index); ! string = string.substring (index + 1); ! object = unpickle (deserialize (code)); ! if (object instanceof NodeFilter) ! { ! filter = wrap ((NodeFilter)object, context); ! if (null != filter) ! vector.addElement (filter); ! } ! else ! break; ! } ! else ! break; ! } } catch (Exception e) *************** *** 361,368 **** if (component instanceof Container) { ! list = ((Container)component).getComponents (); ! for (int i = 0; i < list.length; i++) ! if (list[i] instanceof SubFilterList) ! return ((SubFilterList)list[i]); } --- 392,399 ---- if (component instanceof Container) { ! list = ((Container)component).getComponents (); ! for (int i = 0; i < list.length; i++) ! if (list[i] instanceof SubFilterList) ! return ((SubFilterList)list[i]); } *************** *** 393,411 **** { ret = Filter.instantiate (class_name); ! ret.setNodeFilter (filter, context); ! // recurse into subfilters ! filters = ret.getSubNodeFilters (); ! if (0 != filters.length) ! { ! list = getEnclosed (ret); ! if (null != list) ! { ! ret.setSubNodeFilters (new NodeFilter[0]); // clean out the unwrapped filters ! for (int i = 0; i < filters.length; i++) ! list.addFilter (wrap (filters[i], context)); ! } ! else ! throw new IllegalStateException ("filter can't have subnodes without a SubFilterList on the wrapper"); ! } } catch (Exception e) --- 424,442 ---- { ret = Filter.instantiate (class_name); ! ret.setNodeFilter (filter, context); ! // recurse into subfilters ! filters = ret.getSubNodeFilters (); ! if (0 != filters.length) ! { ! list = getEnclosed (ret); ! if (null != list) ! { ! ret.setSubNodeFilters (new NodeFilter[0]); // clean out the unwrapped filters ! for (int i = 0; i < filters.length; i++) ! list.addFilter (wrap (filters[i], context)); ! } ! else ! throw new IllegalStateException ("filter can't have subnodes without a SubFilterList on the wrapper"); ! } } catch (Exception e) *************** *** 429,441 **** if (selected) setBorder ( ! new CompoundBorder ( ! new EtchedBorder (), ! new CompoundBorder ( new LineBorder(Color.blue, 2), new EmptyBorder (1, 1, 1, 1)))); else setBorder ( ! new CompoundBorder ( ! new EtchedBorder (), new EmptyBorder (3,3,3,3))); } --- 460,472 ---- if (selected) setBorder ( ! new CompoundBorder ( ! new EtchedBorder (), ! new CompoundBorder ( new LineBorder(Color.blue, 2), new EmptyBorder (1, 1, 1, 1)))); else setBorder ( ! new CompoundBorder ( ! new EtchedBorder (), new EmptyBorder (3,3,3,3))); } *************** *** 458,461 **** --- 489,497 ---- } + /** + * Append count spaces to the buffer. + * @param out The buffer to append to. + * @param count The number of spaces to append. + */ public static void spaces (StringBuffer out, int count) { *************** *** 464,468 **** } ! public static void newline (StringBuffer out) { out.append ('\n'); --- 500,508 ---- } ! /** ! * Append a newline to the buffer. ! * @param out The buffer to append to. ! */ ! public static void newline (StringBuffer out) { out.append ('\n'); Index: HtmlTreeModel.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/HtmlTreeModel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HtmlTreeModel.java 13 Feb 2005 20:43:06 -0000 1.1 --- HtmlTreeModel.java 12 Apr 2005 11:27:42 -0000 1.2 *************** *** 37,47 **** /** ! * Each leaf is a TreeItem or something that does toString(). */ public class HtmlTreeModel implements TreeModel { protected Vector mTreeListeners; protected Node mRoot; public HtmlTreeModel (NodeList root) { --- 37,62 ---- /** ! * Quick and dirty tree model for HTML nodes. */ public class HtmlTreeModel implements TreeModel { + /** + * The list of tree listeners. + */ protected Vector mTreeListeners; + + /** + * The root {@link Node}. + */ protected Node mRoot; + /** + * Create an HTML tree view. + * @param root The nodes at the root of the tree + * (the nodes are wrapped in an Html node that is never seen + * because it's the root, but this makes all downstream processing + * super-simple because every tree node is then a {@link Node}, + * not sometimes a {@link NodeList} at the root). + */ public HtmlTreeModel (NodeList root) { *************** *** 56,60 **** // ! // Adds a listener for the TreeModelEvent posted after the tree changes. public void addTreeModelListener (TreeModelListener l) { --- 71,78 ---- // ! /** ! * Adds a listener for the TreeModelEvent posted after the tree changes. ! * @param l {@inheritDoc} ! */ public void addTreeModelListener (TreeModelListener l) { *************** *** 66,70 **** } ! // Removes a listener previously added with addTreeModelListener(). public void removeTreeModelListener(TreeModelListener l) { --- 84,91 ---- } ! /** ! * Removes a listener previously added with addTreeModelListener(). ! * @param l {@inheritDoc} ! */ public void removeTreeModelListener(TreeModelListener l) { *************** *** 75,79 **** } ! // Returns the child of parent at index index in the parent's child array. public Object getChild (Object parent, int index) { --- 96,105 ---- } ! /** ! * Returns the child of parent at index index in the parent's child array. ! * @param parent {@inheritDoc} ! * @param index {@inheritDoc} ! * @return {@inheritDoc} ! */ public Object getChild (Object parent, int index) { *************** *** 92,96 **** } ! // Returns the number of children of parent. public int getChildCount (Object parent) { --- 118,126 ---- } ! /** ! * Returns the number of children of parent. ! * @param parent {@inheritDoc} ! * @return {@inheritDoc} ! */ public int getChildCount (Object parent) { *************** *** 110,114 **** ! // Returns the index of child in parent. public int getIndexOfChild (Object parent, Object child) { --- 140,149 ---- ! /** ! * Returns the index of child in parent. ! * @param parent {@inheritDoc} ! * @param child {@inheritDoc} ! * @return {@inheritDoc} ! */ public int getIndexOfChild (Object parent, Object child) { *************** *** 141,145 **** } ! // Returns the root of the tree. public Object getRoot () { --- 176,183 ---- } ! /** ! * Returns the root of the tree. ! * @return {@inheritDoc} ! */ public Object getRoot () { *************** *** 147,151 **** } ! // Returns true if node is a leaf. public boolean isLeaf (Object node) { --- 185,193 ---- } ! /** ! * Returns true if node is a leaf. ! * @param node {@inheritDoc} ! * @return {@inheritDoc} ! */ public boolean isLeaf (Object node) { *************** *** 162,166 **** } ! // Messaged when the user has altered the value for the item identified by path to newValue. public void valueForPathChanged (TreePath path, Object newValue) { --- 204,212 ---- } ! /** ! * Messaged when the user has altered the value for the item identified by path to newValue. ! * @param path {@inheritDoc} ! * @param newValue {@inheritDoc} ! */ public void valueForPathChanged (TreePath path, Object newValue) { Index: FilterBuilder.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/parserapplications/filterbuilder/FilterBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FilterBuilder.java 10 Apr 2005 23:20:44 -0000 1.4 --- FilterBuilder.java 12 Apr 2005 11:27:42 -0000 1.5 *************** *** 221,227 **** --- 221,242 ---- protected Component mCurrentComponent; + /** + * The main panel GUI component. + */ protected JPanel mMainPanel; + + /** + * The main panel scrolling GUI component. + */ protected JScrollPane mMainScroller; + + /** + * The URL input GUI component. + */ protected JTextField mURLField; + + /** + * The output panel GUI component. + */ protected JDesktopPane mOutput; *************** *** 491,494 **** --- 506,512 ---- * Get a url for the given resource specification. * @param spec The name of the resource. + * @return The fully formed URL. + * @exception MalformedURLException In the case that the document base + * or name of the resource cannot be turned into a URL. */ protected URL getURL (String spec) *************** *** 536,539 **** --- 554,566 ---- } + /** + * Add a filter to the GUI. + * Adds the filter specified by class_name to the menu, toolbar and + * starts listening for actions. + * @param menu The menu to add the filter to. + * @param toolbar The toolbar to add the filter to. + * @param class_name The class name for the filter wrapper. + * From the wrapper, the NodeFilter, description and icon can be obtained. + */ public void addFilter (JMenu menu, JToolBar toolbar, String class_name) { *************** *** 569,572 **** --- 596,608 ---- } + /** + * Adds a set of filters to the main panel or a sublist. + * Sets up the GUI components as drop targets and mouse listeners, + * and performs a relayout to display them. + * @param filters The filter wrappers to add. + * @param point The point at which to start adding (list == null). + * @param list The list to add to (point not used), or <code>null</code> + * for the main panel. + */ protected void insertFilters (Filter[] filters, Point point, SubFilterList list) { *************** *** 649,687 **** } ! /* makes a program like: ! // Generated by FilterBuilder. http://htmlparser.org ! // [aced0005737200206f72672e68746d6c7061727365722e66696c746572732e416e6446696c74657224c30516b2b7b2120200015b000b6d5072656469636174657374001c5b4c6f72672f68746d6c7061727365722f4e6f646546696c7465723b78707572001c5b4c6f72672e68746d6c7061727365722e4e6f646546696c7465723b8f17479b1d5f7992020000787000000002737200246f72672e68746d6c7061727365722e66696c746572732e5461674e616d6546696c746572b28b2601a614890f0200014c00056d4e616d657400124c6a6176612f6c616e672f537472696e673b78707400044d455441737200296f72672e68746d6c7061727365722e66696c746572732e48617341747472696275746546696c74657296abdfb3b0714cda0200024c000a6d41747472696275746571007e00064c00066d56616c756571007e000678707400046e616d6570] ! ! import org.htmlparser.*; ! import org.htmlparser.filters.*; ! import org.htmlparser.beans.*; ! import org.htmlparser.util.*; ! ! public class Test ! { ! public static void main (String args[]) ! { ! TagNameFilter filter0 = new TagNameFilter (); ! filter0.setName ("META"); ! HasAttributeFilter filter1 = new HasAttributeFilter (); ! filter1.setAttributeName ("name"); ! NodeFilter[] array0 = new NodeFilter[2]; ! array0[0] = filter0; ! array0[1] = filter1; ! AndFilter filter2 = new AndFilter (); ! filter2.setPredicates (array0); ! NodeFilter[] array1 = new NodeFilter[1]; ! array1[0] = filter2; ! FilterBean bean = new FilterBean (); ! bean.setFilters (array1); ! if (0 != args.length) ! { ! bean.setURL (args[0]); ! System.out.println (bean.getNodes ().toHtml ()); ! } ! else ! System.out.println ("Usage: java -classpath .:htmlparser.jar Test <url>"); ! } ! } */ protected void makeProgram (String name, StringBuffer out, FilterBean bean) --- 685,730 ---- } ! ! /** ! * Makes a program like: ! * <pre> ! * // Generated by FilterBuilder. http://htmlparser.org ! * // [aced0005737200206f72672e68746d6c7061727365722e66696c746572732e416e6446696c74657224c30516b2b7b2120200015b000b6d5072656469636174657374001c5b4c6f72672f68746d6c7061727365722f4e6f646546696c7465723b78707572001c5b4c6f72672e68746d6c7061727365722e4e6f646546696c7465723b8f17479b1d5f7992020000787000000002737200246f72672e68746d6c7061727365722e66696c746572732e5461674e616d6546696c746572b28b2601a614890f0200014c00056d4e616d657400124c6a6176612f6c616e672f537472696e673b78707400044d455441737200296f72672e68746d6c7061727365722e66696c746572732e48617341747472696275746546696c74657296abdfb3b0714cda0200024c000a6d41747472696275746571007e00064c00066d56616c756571007e000678707400046e616d6570] ! * ! * import org.htmlparser.*; ! * import org.htmlparser.filters.*; ! * import org.htmlparser.beans.*; ! * import org.htmlparser.util.*; ! * ! * public class Test ! * { ! * public static void main (String args[]) ! * { ! * TagNameFilter filter0 = new TagNameFilter (); ! * filter0.setName ("META"); ! * HasAttributeFilter filter1 = new HasAttributeFilter (); ! * filter1.setAttributeName ("name"); ! * NodeFilter[] array0 = new NodeFilter[2]; ! * array0[0] = filter0; ! * array0[1] = filter1; ! * AndFilter filter2 = new AndFilter (); ! * filter2.setPredicates (array0); ! * NodeFilter[] array1 = new NodeFilter[1]; ! * array1[0] = filter2; ! * FilterBean bean = new FilterBean (); ! * bean.setFilters (array1); ! * if (0 != args.length) ! * { ! * bean.setURL (args[0]); ! * System.out.println (bean.getNodes ().toHtml ()); ! * } ! * else ! * System.out.println ("Usage: java -classpath .:htmlparser.jar Test <url>"); ! * } ! * } ! * </pre> ! * @param name The name of the class. ! * @param out The buffer to append to. ! * @param bean The bean to extract the filters from to make the program. */ protected void makeProgram (String name, StringBuffer out, FilterBean bean) *************** *** 1678,1681 **** --- 1721,1728 ---- // + /** + * Add a filter to the current selection set. + * @param filter The filter to add. + */ protected void addSelection (Filter filter) { *************** *** 1686,1689 **** --- 1733,1740 ---- } + /** + * Remove a filter from the current selection set. + * @param filter The filter to remove. + */ protected void removeSelection (Filter filter) { *************** *** 1692,1695 **** --- 1743,1751 ---- } + /** + * Select(highlight)/deselect the current selection set. + * @param select If <code>true</code> turn on highlighting, + * turn it off otherwise. + */ protected void selectSelection (boolean select) { *************** *** 1705,1708 **** --- 1761,1767 ---- } + /** + * Clear (empty) the current selection set. + */ protected void clearSelection () { *************** *** 1711,1714 **** --- 1770,1777 ---- } + /** + * Move the current selection set as a group. + * @param translation The displacement to move them all by. + */ protected void moveSelection (Point translation) { *************** *** 1731,1734 **** --- 1794,1803 ---- } + /** + * Check if the current selection set contains the given filter. + * @param filter The filter to check. + * @return <code>true</code> if the filter is a member, + * <code>false</code> otherwise. + */ protected boolean selectionContains (Filter filter) { *************** *** 1736,1739 **** --- 1805,1813 ---- } + /** + * Return the last filter added to the selection set. + * @return The last filter added or <code>null</code> if the current + * selection set is empty. + */ protected Filter lastSelected () { *************** *** 1748,1751 **** --- 1822,1829 ---- } + /** + * Return the current selection set as an array. + * @return The array of selected filters. + */ protected Filter[] getSelection () { *************** *** 1758,1761 **** --- 1836,1843 ---- } + /** + * Serialize the current selection set. + * @return The serialized form of the set of filters. + */ public String serializeSelection () { *************** *** 1765,1769 **** filters = getSelection (); - // serialize the selection writer = new StringWriter (200); out = new PrintWriter (writer, false); --- 1847,1850 ---- *************** *** 1784,1787 **** --- 1865,1871 ---- } + /** + * Delete the current selection set from the filters in the GUI. + */ public void deleteSelection () { *************** *** 1801,1804 **** --- 1885,1893 ---- } + /** + * Check if there is more than one filter selected. + * @return <code>true</code> if only one filter is selected, + * <code>false</code> otherwise. + */ public boolean isSingleSelection () { *************** *** 2167,2172 **** /** * This message goes to DragSourceListener, ! * informing it that the dragging has ended ! * */ public void dragDropEnd (DragSourceDropEvent event) --- 2256,2261 ---- /** * This message goes to DragSourceListener, ! * informing it that the dragging has ended. ! * @param event Details about the drop event. */ public void dragDropEnd (DragSourceDropEvent event) *************** *** 2180,2185 **** /** * This message goes to DragSourceListener, ! * informing it that the dragging has entered the DropSite ! * */ public void dragEnter (DragSourceDragEvent event) --- 2269,2274 ---- /** * This message goes to DragSourceListener, ! * informing it that the dragging has entered the DropSite. ! * @param event Details about the drag event. */ public void dragEnter (DragSourceDragEvent event) *************** *** 2189,2195 **** /** ! * this message goes to DragSourceListener, informing it that the dragging ! * has exited the DropSite ! * */ public void dragExit (DragSourceEvent event) --- 2278,2284 ---- /** ! * This message goes to DragSourceListener, informing it that the dragging ! * has exited the DropSite. ! * @param event Details about the drag event. */ public void dragExit (DragSourceEvent event) *************** *** 2199,2205 **** /** ! * this message goes to DragSourceListener, informing it that the dragging is currently ! * ocurring over the DropSite ! * */ public void dragOver (DragSourceDragEvent event) --- 2288,2294 ---- /** ! * This message goes to DragSourceListener, informing it that the dragging is currently ! * ocurring over the DropSite. ! * @param event Details about the drag event. */ public void dragOver (DragSourceDragEvent event) *************** *** 2209,2214 **** /** ! * is invoked when the user changes the dropAction ! * */ public void dropActionChanged (DragSourceDragEvent event) --- 2298,2303 ---- /** ! * This is invoked when the user changes the dropAction. ! * @param event Details about the drop action event. */ public void dropActionChanged (DragSourceDragEvent event) *************** *** 2222,2227 **** /** ! * is invoked when you are dragging over the DropSite ! * */ public void dragEnter (DropTargetDragEvent event) --- 2311,2316 ---- /** ! * This is invoked when you are dragging over the DropSite. ! * @param event Details about the drag event. */ public void dragEnter (DropTargetDragEvent event) *************** *** 2256,2261 **** /** ! * is invoked when you are exit the DropSite without dropping ! * */ public void dragExit (DropTargetEvent event) --- 2345,2350 ---- /** ! * Thi ss invoked when you are exit the DropSite without dropping. ! * @param event Details about the drag event. */ public void dragExit (DropTargetEvent event) *************** *** 2287,2292 **** /** ! * is invoked when a drag operation is going on ! * */ public void dragOver (DropTargetDragEvent event) --- 2376,2381 ---- /** ! * This is invoked when a drag operation is going on. ! * @param event Details about the drag event. */ public void dragOver (DropTargetDragEvent event) *************** *** 2296,2300 **** /** ! * a drop has occurred * @param event The drop event. */ --- 2385,2389 ---- /** ! * This is invoked when a drop has occurred. * @param event The drop event. */ *************** *** 2369,2378 **** /** ! * is invoked if the use modifies the current drop gesture ! * */ ! public void dropActionChanged ( DropTargetDragEvent event ) { ! System.out.println( "dropActionChanged"); } --- 2458,2467 ---- /** ! * This is invoked if the user modifies the current drop gesture. ! * @param event Details about the drop action change event. */ ! public void dropActionChanged (DropTargetDragEvent event) { ! // System.out.println( "dropActionChanged"); } |