de.hattrickorganizer.gui.model
Class UserColumn

java.lang.Object
  extended by de.hattrickorganizer.gui.model.UserColumn

public abstract class UserColumn
extends java.lang.Object

Basic Class for all table columns.

Since:
1.36
Author:
Thorsten Dietz

Field Summary
protected  java.lang.String columnName
          columnName properties representation, not display!!
protected  boolean display
          if a column is shown in the jtable.
protected  int id
          unique column id
protected  int index
          index of the column in the JTable.
protected  int minWidth
          mininmum width of the column
protected  int preferredWidth
          preferred width of the column
protected  java.lang.String tooltip
          tooltip properties representation, not display!!
 
Constructor Summary
protected UserColumn(int id, java.lang.String name)
          constructor
protected UserColumn(int id, java.lang.String name, java.lang.String tooltip)
          constructor
 
Method Summary
 java.lang.String getColumnName()
          returns the language dependency name of the column
 int getId()
          return id
 int getIndex()
          return the currently index of column only actual if user donīt move the column !!
 int getPreferredWidth()
           
 java.lang.String getTooltip()
          returns the language dependency tooltip of the column
 boolean isDisplay()
          Should a column be shown
 boolean isEditable()
          Some columns must be displayed, so some columns are not editable
 void setDisplay(boolean display)
          set a column to be showed
 void setIndex(int index)
          set index if columnModel should be saved index will set, or column is loaded
 void setPreferredWidth(int width)
          set preferredWidth for saving to DB
 void setSize(javax.swing.table.TableColumn column)
          set minWidth and prefWidth in the TableColumn
 java.lang.String toString()
          String representation use in UserColumnsPanel in OptionsPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected int id
unique column id


columnName

protected java.lang.String columnName
columnName properties representation, not display!!


tooltip

protected java.lang.String tooltip
tooltip properties representation, not display!!


minWidth

protected int minWidth
mininmum width of the column


preferredWidth

protected int preferredWidth
preferred width of the column


index

protected int index
index of the column in the JTable. position


display

protected boolean display
if a column is shown in the jtable. Only displayed columns are saved in db

Constructor Detail

UserColumn

protected UserColumn(int id,
                     java.lang.String name,
                     java.lang.String tooltip)
constructor

Parameters:
id -
name -
tooltip -

UserColumn

protected UserColumn(int id,
                     java.lang.String name)
constructor

Parameters:
id -
name -
Method Detail

getColumnName

public final java.lang.String getColumnName()
returns the language dependency name of the column

Returns:
String

getId

public final int getId()
return id

Returns:
int

getTooltip

public final java.lang.String getTooltip()
returns the language dependency tooltip of the column

Returns:

isDisplay

public final boolean isDisplay()
Should a column be shown

Returns:
boolean

setDisplay

public final void setDisplay(boolean display)
set a column to be showed

Parameters:
display -

getIndex

public final int getIndex()
return the currently index of column only actual if user donīt move the column !!

Returns:
int

setIndex

public final void setIndex(int index)
set index if columnModel should be saved index will set, or column is loaded

Parameters:
index -

toString

public java.lang.String toString()
String representation use in UserColumnsPanel in OptionsPanel

Overrides:
toString in class java.lang.Object

isEditable

public boolean isEditable()
Some columns must be displayed, so some columns are not editable

Returns:
boolean

setSize

public void setSize(javax.swing.table.TableColumn column)
set minWidth and prefWidth in the TableColumn

Parameters:
column -

setPreferredWidth

public void setPreferredWidth(int width)
set preferredWidth for saving to DB

Parameters:
width -

getPreferredWidth

public int getPreferredWidth()