Class ArrayColumn
- java.lang.Object
-
- org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayColumn
-
- All Implemented Interfaces:
SimpleGraphicElement
public class ArrayColumn extends Object implements SimpleGraphicElement
- Author:
- squere
-
-
Field Summary
Fields Modifier and Type Field Description static int
COLUMN_BEHAVIOUR_DEFAULT
Default behaviour in which the column header is sortable.static int
COLUMN_BEHAVIOUR_NO_TRIGGER
This behaviour is set when a column header is not sortable.protected String
routingAddress
In some cases, it may be preferable to specify the routing address (viasetRoutingAddress(String address)
) If not theprint()
method defaults to an address derived from the request URL.
-
Constructor Summary
Constructors Constructor Description ArrayColumn(String title, int columnNumber, ArrayPane pane)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnNumber()
BiFunction<Object,Integer,Comparable<Object>>
getCompareOn()
String
getTitle()
String
getWidth()
protected boolean
isArrayPaneURL(String address)
boolean
isSortable()
String
print()
Print an html representation for this object.void
setCompareOn(BiFunction<Object,Integer,Comparable<Object>> compareOn)
void
setRoutingAddress(String address)
This method sets the routing address.void
setSortable(boolean sortable)
Set the column to be sortable or not.void
setTitle(String title)
void
setWidth(String width)
-
-
-
Field Detail
-
COLUMN_BEHAVIOUR_NO_TRIGGER
public static final int COLUMN_BEHAVIOUR_NO_TRIGGER
This behaviour is set when a column header is not sortable. No hyperlink will be anchored around the title of the column.- See Also:
- Constant Field Values
-
COLUMN_BEHAVIOUR_DEFAULT
public static final int COLUMN_BEHAVIOUR_DEFAULT
Default behaviour in which the column header is sortable. An hyperlink will be anchored around the title of the column.- See Also:
- Constant Field Values
-
routingAddress
protected String routingAddress
In some cases, it may be preferable to specify the routing address (viasetRoutingAddress(String address)
) If not theprint()
method defaults to an address derived from the request URL. Note that te routing address may start with the protocol string arraypane:, in which case a javascript:doArrayPane() URL is issued instead of a standard URL.
-
-
Method Detail
-
setRoutingAddress
public void setRoutingAddress(String address)
This method sets the routing address. This is actually the URL of the page to which requests will be routed when the user clicks on a column header link.- Parameters:
address
- the address of the service for processing the requests.
-
setSortable
public void setSortable(boolean sortable)
Set the column to be sortable or not. If the array is already unsortable, this method will have no effect.- Parameters:
sortable
- A true value will enable this column to be sorted
-
isSortable
public boolean isSortable()
-
getCompareOn
public BiFunction<Object,Integer,Comparable<Object>> getCompareOn()
-
setCompareOn
public void setCompareOn(BiFunction<Object,Integer,Comparable<Object>> compareOn)
-
setTitle
public void setTitle(String title)
-
getTitle
public String getTitle()
-
getColumnNumber
public int getColumnNumber()
-
setWidth
public void setWidth(String width)
-
getWidth
public String getWidth()
-
isArrayPaneURL
protected boolean isArrayPaneURL(String address)
-
print
public String print()
Description copied from interface:SimpleGraphicElement
Print an html representation for this object.- Specified by:
print
in interfaceSimpleGraphicElement
- Returns:
- The html representation for this object.
-
-