KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > markers > internal > IField


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.views.markers.internal;
13
14 import org.eclipse.swt.graphics.Image;
15
16 /**
17  * IField is the definition of fields for marker views.
18  *
19  */

20 public interface IField {
21
22     /**
23      * @return String the description of the field.
24      */

25     String JavaDoc getDescription();
26
27     /**
28      * @return the image associated with the description of the field or <code>null<code>.
29      */

30     Image getDescriptionImage();
31
32     /**
33      * @return The text to be displayed in the column header for this field.
34      */

35     String JavaDoc getColumnHeaderText();
36
37     /**
38      * @return The image to be displayed in the column header for this field or <code>null<code>.
39      */

40     Image getColumnHeaderImage();
41
42     /**
43      * @param obj
44      * @return The String value of the object for this particular field to be displayed to the user.
45      */

46     String JavaDoc getValue(Object JavaDoc obj);
47
48     /**
49      * @param obj
50      * @return The image value of the object for this particular field to be displayed to the user
51      * or <code>null<code>.
52      */

53     Image getImage(Object JavaDoc obj);
54
55     /**
56      * @param obj1
57      * @param obj2
58      * @return Either:
59      * <li>a negative number if the value of obj1 is less than the value of obj2 for this field.
60      * <li><code>0</code> if the value of obj1 and the value of obj2 are equal for this field.
61      * <li>a positive number if the value of obj1 is greater than the value of obj2 for this field.
62      */

63     int compare(Object JavaDoc obj1, Object JavaDoc obj2);
64     
65     /**
66      * Get the default direction for the receiver. Return either
67      * {@link TableComparator#ASCENDING } or {@link TableComparator#DESCENDING }
68      * @return int
69      */

70    int getDefaultDirection();
71    
72    /**
73     * Get the preferred width of the receiver.
74     * @return int
75     */

76    int getPreferredWidth();
77
78    /**
79     * Return whether not the receiver is showing.
80     * @return boolean
81     */

82    boolean isShowing();
83    
84    /**
85     * Set whether or not the receiver is showing.
86     * @param showing
87     */

88   void setShowing(boolean showing);
89    
90  
91 }
92
Popular Tags