Ignore:
Timestamp:
2003-05-27T15:57:37+12:00 (21 years ago)
Author:
kjdon
Message:

re-tabbed the code for java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/HeaderRenderer.java

    r4293 r4366  
    4747 */
    4848public class HeaderRenderer
    49     extends JToggleButton
    50     implements TableCellRenderer {
    51     /** The constructor sets up a margin around the button, and adds the filter icons.
    52       * @see org.greenstone.gatherer.util.Utility
    53       */
    54     public HeaderRenderer() {
    55           setMargin(new Insets(0,0,0,0));
    56           setIcon(Utility.getImage("filter.gif"));
    57           setSelectedIcon(Utility.getImage("filter-on.gif"));
    58     }
    59     /** Called to create the component to be used as the 'rubber-stamp' for the table cell given the follwing arguments.
     49    extends JToggleButton
     50    implements TableCellRenderer {
     51    /** The constructor sets up a margin around the button, and adds the filter icons.
     52     * @see org.greenstone.gatherer.util.Utility
     53     */
     54    public HeaderRenderer() {
     55    setMargin(new Insets(0,0,0,0));
     56    setIcon(Utility.getImage("filter.gif"));
     57    setSelectedIcon(Utility.getImage("filter-on.gif"));
     58    }
     59    /** Called to create the component to be used as the 'rubber-stamp' for the table cell given the follwing arguments.
    6060      * @param table The <strong>JTable</strong> that is asking the renderer to draw; can be <i>null</i>.
    6161      * @param value The value of the cell to be rendered as an <strong>Object</strong>. It is up to the specific renderer to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value.
     
    6666      * @see org.greenstone.gatherer.gui.metaaudit.MetaAuditTable
    6767      */
    68     public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    69           setText(value.toString());
    70           MetaAuditTable temp = (MetaAuditTable) table;
    71           if(temp != null) { // And it may if this is called during table init.
    72                 setSelected(temp.isFiltered(column));
    73           }
    74           return this;
    75     }
     68    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
     69    setText(value.toString());
     70    MetaAuditTable temp = (MetaAuditTable) table;
     71    if(temp != null) { // And it may if this is called during table init.
     72        setSelected(temp.isFiltered(column));
     73    }
     74    return this;
     75    }
    7676}
Note: See TracChangeset for help on using the changeset viewer.