org.ujorm.wicket.component.grid
Class KeyColumnBoolean<U extends Ujo>

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<U,KeyRing<U>>
      extended by org.ujorm.wicket.component.grid.KeyColumn<U,Boolean>
          extended by org.ujorm.wicket.component.grid.KeyColumnBoolean<U>
All Implemented Interfaces:
Serializable, org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<U>, org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn<U,KeyRing<U>>, org.apache.wicket.extensions.markup.html.repeater.data.table.IStyledColumn<U,KeyRing<U>>, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable

public class KeyColumnBoolean<U extends Ujo>
extends KeyColumn<U,Boolean>

Key column for a boolean data type

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
protected  String cssOkClass
          Class for OK value
protected static String DEFAULT_CSS_OK_CLASS
          Default CSS class for an OK value
protected static String DEFAULT_LOGICAL_CLASS
          Default CSS class for an OK value
 
Fields inherited from class org.ujorm.wicket.component.grid.KeyColumn
cssClass, keySerializable, PROPERTY_PREFIX, SORTING_OFF, SORTING_ON
 
Constructor Summary
KeyColumnBoolean(Key<U,?> key, Key<U,?> keySortable, String cssClass)
           
KeyColumnBoolean(KeyRing<U> key, KeyRing<U> keySortable, String cssClass, String cssOkClass)
           
 
Method Summary
protected  void appendCssClass(org.apache.wicket.Component value, U ujo)
          Append css class
protected  org.apache.wicket.model.IModel<?> createValueModel(U ujo)
          Create a Value component
 String getCssOkClass()
          Returns a CSS class of the true value
static
<U extends Ujo,T>
KeyColumn<U,T>
of(Key<U,T> key, boolean sorted)
          A factory method where a default key getCssOkClass() have got value DEFAULT_CSS_OK_CLASS
static
<U extends Ujo,T>
KeyColumn<U,T>
of(Key<U,T> key, boolean sorted, String cssOkClass)
          A factory method
static
<U extends Ujo,T>
KeyColumn<U,T>
of(Key<U,T> key, Key<U,T> sort, String cssOkClass)
          A factory method
 
Methods inherited from class org.ujorm.wicket.component.grid.KeyColumn
createValueCoponent, getCssClass, getKey, getPropertyExpression, populateItem, setCssClass, toString
 
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn
detach, getDisplayModel, getHeader, getSortProperty, isSortable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_LOGICAL_CLASS

protected static String DEFAULT_LOGICAL_CLASS
Default CSS class for an OK value


DEFAULT_CSS_OK_CLASS

protected static String DEFAULT_CSS_OK_CLASS
Default CSS class for an OK value


cssOkClass

protected final String cssOkClass
Class for OK value

Constructor Detail

KeyColumnBoolean

public KeyColumnBoolean(Key<U,?> key,
                        Key<U,?> keySortable,
                        String cssClass)

KeyColumnBoolean

public KeyColumnBoolean(KeyRing<U> key,
                        KeyRing<U> keySortable,
                        String cssClass,
                        String cssOkClass)
Method Detail

createValueModel

protected org.apache.wicket.model.IModel<?> createValueModel(U ujo)
Create a Value component

Overrides:
createValueModel in class KeyColumn<U extends Ujo,Boolean>
Returns:
model

appendCssClass

protected void appendCssClass(org.apache.wicket.Component value,
                              U ujo)
Append css class

Overrides:
appendCssClass in class KeyColumn<U extends Ujo,Boolean>

getCssOkClass

public String getCssOkClass()
Returns a CSS class of the true value


of

public static <U extends Ujo,T> KeyColumn<U,T> of(Key<U,T> key,
                                                  boolean sorted)
A factory method where a default key getCssOkClass() have got value DEFAULT_CSS_OK_CLASS

Parameters:
key - Domain Key
sorted - A sorting request
Returns:
New instance of the KeyColumn class

of

public static <U extends Ujo,T> KeyColumn<U,T> of(Key<U,T> key,
                                                  boolean sorted,
                                                  String cssOkClass)
A factory method

Parameters:
key - Domain Key
sorted - Sorted column
cssOkClass - Class for a value Boolean.TRUE where a default value is DEFAULT_CSS_OK_CLASS.
Returns:
New instance of the KeyColumn class

of

public static <U extends Ujo,T> KeyColumn<U,T> of(Key<U,T> key,
                                                  Key<U,T> sort,
                                                  String cssOkClass)
A factory method

Parameters:
key - Domain Key
sort - Key of sorting
cssOkClass - Class for a value Boolean.TRUE where a default value is DEFAULT_CSS_OK_CLASS.
Returns:


Copyright © 2014. All Rights Reserved.