com.groiss.gui.table
Class CellValue

java.lang.Object
  extended by com.groiss.gui.table.CellValue
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<CellValue>

public class CellValue
extends java.lang.Object
implements java.lang.Comparable<CellValue>, java.lang.Cloneable

Use this object for writing a cell value into a table model if you need cell attributes.


Constructor Summary
CellValue(java.lang.Object value, java.lang.Comparable sort, java.lang.Object filter)
           
CellValue(java.lang.Object value, java.util.List<Pair<java.lang.String,java.lang.String>> attributes)
          Construct a new cell value.
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(CellValue o)
           
 boolean equals(java.lang.Object obj)
           
 java.util.List<Pair<java.lang.String,java.lang.String>> getAttributes()
          Get the attribute list.
 java.lang.Object getFilterVal()
           
 java.lang.Comparable getSortVal()
           
 java.lang.Object getValue()
          Get the value.
 int hashCode()
           
 void setAttributes(java.util.List<Pair<java.lang.String,java.lang.String>> attributes)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CellValue

public CellValue(java.lang.Object value,
                 java.util.List<Pair<java.lang.String,java.lang.String>> attributes)
Construct a new cell value.

Parameters:
value - the cell content
attributes - a lists of cell properties, pairs of name and value, for example: new Pair("style","color:red")

CellValue

public CellValue(java.lang.Object value,
                 java.lang.Comparable sort,
                 java.lang.Object filter)
Method Detail

getAttributes

public java.util.List<Pair<java.lang.String,java.lang.String>> getAttributes()
Get the attribute list.


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

setAttributes

public void setAttributes(java.util.List<Pair<java.lang.String,java.lang.String>> attributes)

getValue

public java.lang.Object getValue()
Get the value.


getSortVal

public final java.lang.Comparable getSortVal()

getFilterVal

public final java.lang.Object getFilterVal()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(CellValue o)
Specified by:
compareTo in interface java.lang.Comparable<CellValue>

toString

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


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.