net.sourceforge.atunes.gui.views.controls.playList
Class Column

java.lang.Object
  extended by net.sourceforge.atunes.gui.views.controls.playList.Column
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Column>

public abstract class Column
extends java.lang.Object
implements java.lang.Comparable<Column>, java.io.Serializable

This class represents a column of Play List.

Author:
fleax
See Also:
Serialized Form

Nested Class Summary
static class Column.ColumnSort
          Column sort: ascending or descending
 
Constructor Summary
Column(PlayListColumns.PlayListColumn columnId, java.lang.String headerText, java.lang.Class<?> columnClass)
          Constructor with columnId, headerText and columnClass.
 
Method Summary
 void applyColumnBean(ColumnBean bean)
          Apply column bean.
 int compareTo(Column o)
          Compare method.
 int getAlignment()
          Gets the alignment.
 javax.swing.table.TableCellEditor getCellEditor()
          Gets the cell editor.
 javax.swing.table.TableCellRenderer getCellRenderer()
          Gets the cell renderer.
 ColumnBean getColumnBean()
          Gets the column bean.
 java.lang.Class<?> getColumnClass()
          Gets the column class.
 PlayListColumns.PlayListColumn getColumnId()
          Gets the column id.
 java.lang.String getColumnName()
          Gets the column name.
 java.util.Comparator<AudioObject> getComparator()
          Return a comparator to sort playlist by this column.
 java.lang.String getHeaderText()
          Gets the header text.
 int getOrder()
          Gets the order.
abstract  java.lang.Object getValueFor(AudioObject audioObject)
          Returns value for a column of an audiofile.
 int getWidth()
          Gets the width.
 boolean isEditable()
          Checks if is editable.
 boolean isResizable()
          Checks if is resizable.
 boolean isVisible()
          Checks if is visible.
 void setAlignment(int alignment)
          Sets the alignment.
 void setColumnClass(java.lang.Class<?> columnClass)
          Sets the column class.
 void setColumnId(PlayListColumns.PlayListColumn columnId)
          Sets the column id.
 void setEditable(boolean editable)
          Sets the editable.
 void setHeaderText(java.lang.String headerText)
          Sets the header text.
 void setOrder(int order)
          Sets the order.
 void setResizable(boolean resizable)
          Sets the resizable.
 void setValueFor(AudioObject audioObject, java.lang.Object value)
          Sets value for a property of an audio object.
 void setVisible(boolean visible)
          Sets the visible.
 void setWidth(int width)
          Sets the width.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column(PlayListColumns.PlayListColumn columnId,
              java.lang.String headerText,
              java.lang.Class<?> columnClass)
Constructor with columnId, headerText and columnClass.

Parameters:
columnId - the column id
headerText - the header text
columnClass - the column class
Method Detail

applyColumnBean

public void applyColumnBean(ColumnBean bean)
Apply column bean.

Parameters:
bean - the bean

compareTo

public int compareTo(Column o)
Compare method.

Specified by:
compareTo in interface java.lang.Comparable<Column>
Parameters:
o - the o
Returns:
the int

getAlignment

public int getAlignment()
Gets the alignment.

Returns:
the alignment

getCellEditor

public javax.swing.table.TableCellEditor getCellEditor()
Gets the cell editor.

Returns:
the cellEditor

getCellRenderer

public javax.swing.table.TableCellRenderer getCellRenderer()
Gets the cell renderer.

Returns:
the cellRenderer

getColumnBean

public ColumnBean getColumnBean()
Gets the column bean.

Returns:
the column bean

getColumnClass

public java.lang.Class<?> getColumnClass()
Gets the column class.

Returns:
the columnClass

getColumnId

public PlayListColumns.PlayListColumn getColumnId()
Gets the column id.

Returns:
the columnId

getColumnName

public java.lang.String getColumnName()
Gets the column name.

Returns:
the column name

getHeaderText

public java.lang.String getHeaderText()
Gets the header text.

Returns:
the headerText

getOrder

public int getOrder()
Gets the order.

Returns:
the order

getValueFor

public abstract java.lang.Object getValueFor(AudioObject audioObject)
Returns value for a column of an audiofile.

Parameters:
audioObject - the audio object
Returns:
the value for

getWidth

public int getWidth()
Gets the width.

Returns:
the width

isEditable

public boolean isEditable()
Checks if is editable.

Returns:
the editable

isResizable

public boolean isResizable()
Checks if is resizable.

Returns:
the resizable

isVisible

public boolean isVisible()
Checks if is visible.

Returns:
the visible

setAlignment

public void setAlignment(int alignment)
Sets the alignment.

Parameters:
alignment - the alignment to set

setColumnClass

public void setColumnClass(java.lang.Class<?> columnClass)
Sets the column class.

Parameters:
columnClass - the columnClass to set

setColumnId

public void setColumnId(PlayListColumns.PlayListColumn columnId)
Sets the column id.

Parameters:
columnId - the columnId to set

setEditable

public void setEditable(boolean editable)
Sets the editable.

Parameters:
editable - the editable to set

setHeaderText

public void setHeaderText(java.lang.String headerText)
Sets the header text.

Parameters:
headerText - the headerText to set

setOrder

public void setOrder(int order)
Sets the order.

Parameters:
order - the order to set

setResizable

public void setResizable(boolean resizable)
Sets the resizable.

Parameters:
resizable - the resizable to set

setValueFor

public void setValueFor(AudioObject audioObject,
                        java.lang.Object value)
Sets value for a property of an audio object.

Parameters:
audioObject - the audio object
value - the value

setVisible

public void setVisible(boolean visible)
Sets the visible.

Parameters:
visible - the visible to set

setWidth

public void setWidth(int width)
Sets the width.

Parameters:
width - the width to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getComparator

public java.util.Comparator<AudioObject> getComparator()
Return a comparator to sort playlist by this column. If last sort was descending or not sort was done before, return ascending comparator If las sort was ascending, return descending comparator

Returns:


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.