Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: dr/davmgr/swingview/internalframes/views/View.java


1   package dr.davmgr.swingview.internalframes.views;
2   
3   import java.util.List;
4   import java.util.EventListener;
5   
6   import java.awt.datatransfer.Transferable;
7   import java.awt.Component;
8   import javax.swing.JScrollPane;
9   
10  import dr.davmgr.protocol.Urls;
11  
12  /** Interface to generalize Urls views. 
13   *@author Daniel Rohde
14   */
15  public interface View extends Transferable{
16  
17    public final static String P_USE_DND = "dr.davmgr.swingview.internalframe.usednd";
18  
19    /** Adds a EventListener to a view. Events are View dependent 
20      therefore only double clicks and selections on lists and tables
21      are listened.
22     *@param eventListener is a new EventListener
23     */
24    public void addEventListener(EventListener eventListener);
25  
26    public void removeEventListener(EventListener eventListener);
27  
28    /** Sets JScrollPane as view pane. It must be set.
29      *@param scrollPane JScrollPane for viewing
30      */
31    public void setScrollPane(JScrollPane scrollPane);
32  
33    /** Sets Urls as a new model for view. 
34     *@param urls Urls instance with childs to show.
35     */
36    public void setUrls(Urls urls);
37  
38    /** Returns actual Urls from model 
39     *@return actual Urls from model
40     */
41    public Urls getUrls();
42  
43    /** Send model changed signal.  */
44    public void modelChanged();
45    
46    /** Returns selected Urls.
47     *@return selected Urls 
48     */
49    public List getSelectedUrls();
50  
51    /** Returns component of the view.
52     *@return component
53     */
54    public Component getComponent();
55  
56    /** Sets selections on view.
57     *@param Set it to true if all elements must be selected; false
58      if element selection must be removed.
59     */ 
60    public void setSelection(boolean all);
61  
62    /** Sets selection in the near of a point.
63     *@param x x coordinate
64     *@param y y coordinate
65     */
66    public void setSelection(int x, int y);
67  
68    /** The ascendent order parameter 
69     *@see #setOrder */
70    public final static int ASCENDENT_ORDER  = 1;
71    
72    /** The descendent order parameter 
73     *@see #setOrder*/
74    public final static int DESCENDENT_ORDER = 2;
75  
76    /** Sets the sorting order.
77     *@param attribute Urls attribute that have to be ordered.
78     *@param order sorting order 
79     *@see #ASCENDENT_ORDER
80     *@see #DESCENDENT_ORDER
81     */
82    public void setOrder(String attribute, int order);
83  
84    public void finalize();
85  
86  }