KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xam > ui > column > ColumnView


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.xam.ui.column;
21
22 /**
23  * A ColumnView contains one or more Column instances, and manages their
24  * display in terms of providing a scrollable view.
25  *
26  * @author Nathan Fiedler
27  */

28 public interface ColumnView {
29
30     /**
31      * Appends the given column to the end of the column list.
32      *
33      * @param column Column to be added to view.
34      */

35     void appendColumn(Column column);
36
37     /**
38      * Appends the array of columns to the end of the column list.
39      * Any scrolling will be done once, making the last column visible.
40      *
41      * @param columns array of columns to be added to view.
42      */

43     void appendColumns(Column[] columns);
44
45     /**
46      * Remove all of the columns from the view.
47      */

48     void clearColumns();
49
50     /**
51      * Returns the number of columns contained in this view.
52      *
53      * @return column count.
54      */

55     int getColumnCount();
56
57     /**
58      * Get the index into the list for the given column.
59      *
60      * @param column Column to locate in view.
61      * @return index of the column, or -1 if not found.
62      */

63     int getColumnIndex(Column column);
64
65     /**
66      * Retrieves the first column in the view.
67      *
68      * @return first Column, or null if no columns exist.
69      */

70     Column getFirstColumn();
71
72     /**
73      * Retrieves the column following the one given.
74      *
75      * @param column Column for which to find sibling.
76      * @return next Column, or null if none.
77      */

78     Column getNextColumn(Column column);
79
80     /**
81      * Removes the columns after the one given.
82      *
83      * @param column Column that will be the new right-most column.
84      */

85     void removeColumnsAfter(Column column);
86
87     /**
88      * Scrolls the viewport to make the specified column visible. If the
89      * synchronous parameter is false, this method will return before the
90      * viewport has finished scrolling. If the synchronous parameter is
91      * true, this method will scroll the viewport on the event thread
92      * (if the invoking thread is not the event thread, this method will
93      * block on the event thread until the scrolling is complete).
94      *
95      * @param column Column to make visible.
96      * @param synchronous true to scroll now, on event thread, false to
97      * scroll some time later, on event thread.
98      */

99     void scrollToColumn(Column column, boolean synchronous);
100 }
101
Popular Tags