com.sap.netweaver.bc.uwl.config

Class DisplayAttribute

java.lang.Object
  extended by com.sap.netweaver.bc.uwl.config.Attribute
      extended by com.sap.netweaver.bc.uwl.config.DisplayAttribute
All Implemented Interfaces:
Serializable, Cloneable

public final class DisplayAttribute
extends Attribute
implements Cloneable, Serializable

Represents one dislay attribute used in the UWL configuation file. Typically one display attribute maps to one column in the UWL list view.

The display Attribute is created by the standard or custom XLF file (See example)
<DisplayAttribute name="subject" type ="link" width="" sortable="yes" actionRef="viewDetail" referenceBundle="subject"/>

See Also:
UWLView, Serialized Form

Field Summary
 
Fields inherited from class com.sap.netweaver.bc.uwl.config.Attribute
descriptions
 
Constructor Summary
DisplayAttribute(String name, String typ, String dName)
          Constructor for DisplayAttribute.
 
Method Summary
 Object clone()
           
 String getActionRef()
          Used Internaly only
 Action[] getActions()
          Returns the actions.
 String getFormat()
          Returns the display date format.
 String getHAlign()
          Return the HAlignment for the DisplayAttribute CENTER LEFT RIGHT JUSTIFY
 String getId()
          This is the unique id for the displayAttribute name.
 ImageMapping getImageMapping()
          This will define a mapping between data and images to be displayed.
 int getMaxTextWidth()
          Get the max number of characters which should be displayed in the UWL Table.
 MenuItemCollection getMenuItemCollection()
          This is the menu items which will be assiociated with this display Attribute.
 Properties getProperties()
          Returns the properties.
 String getReferenceBundle()
          Used internaly
 String getType()
          This is the display attribute type.
 String getVAlign()
          Returns the desired VAligment for the DisplayAttribute BASELINE BOTTOM MIDDLE TOP
 String getWidth()
          Returns the width.
 boolean isGlobal()
          Deprecated. no longer used
 boolean isGroupAction()
           
 boolean isHeaderDisplayable()
          Indicates if the Column header should be displayed or not.
 boolean isSortable()
          Returns if this DisplayAttribute is sortable.
 void setActionRef(String string)
          Used Internaly only
 void setActions(Action[] actions)
           
 void setFormat(String format)
          Sets the display format (Used for date format only).
 void setGlobal(boolean b)
          Deprecated. no longer used
 void setHAlign(String string)
          Indicate the HAlignment for the DisplayAttribute CENTER LEFT RIGHT JUSTIFY
 void setHeaderDisplayable(boolean b)
           
 void setImageMapping(ImageMapping mapping)
           
 void setMaxTextWidth(int i)
          Set the max number of characters to be displayed in the UWL Table.
 void setMenuItemCollection(MenuItemCollection collection)
           
 void setProperties(Properties properties)
          Sets the properties.
 void setReferenceBundle(String refBundle)
          Used internaly
 void setSortable(boolean sortable)
          Set if this DisplayAttribute can be sorted.
 void setVAlign(String string)
          Indicate the Vertical Alignment for the DisplayAttribute BASELINE BOTTOM MIDDLE TOP
 void setWidth(String width)
          Sets the width.
 
Methods inherited from class com.sap.netweaver.bc.uwl.config.Attribute
getDescriptions, getDisplayName, getLongText, getName, getShortText, setDescriptions, setName, setType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayAttribute

public DisplayAttribute(String name,
                        String typ,
                        String dName)
Constructor for DisplayAttribute.

Parameters:
name -
typ -
dName -
Method Detail

getId

public String getId()
This is the unique id for the displayAttribute name.

Returns:
The name
See Also:
Attribute.getName()

getType

public String getType()
This is the display attribute type.

For the values of the type, refer to DTD documentation or constants from DTDConstants javadoc. Typically one of "double","int","string" etc..

Overrides:
getType in class Attribute
Returns:
non null value
See Also:
Attribute.getType()

getActions

public Action[] getActions()
Returns the actions.

Returns:
Action[]

setActions

public void setActions(Action[] actions)
Parameters:
actions -

getProperties

public Properties getProperties()
Returns the properties.

Returns:
Properties

getWidth

public String getWidth()
Returns the width.

Returns:
String

setProperties

public void setProperties(Properties properties)
Sets the properties.

Parameters:
properties - The properties to set

setWidth

public void setWidth(String width)
Sets the width.

Parameters:
width - The width to set

isGroupAction

public boolean isGroupAction()

isSortable

public boolean isSortable()
Returns if this DisplayAttribute is sortable.

Returns:
boolean

setSortable

public void setSortable(boolean sortable)
Set if this DisplayAttribute can be sorted.

Parameters:
sortable - The sortable to set

getFormat

public String getFormat()
Returns the display date format.
 short 
 medium 
 long 
 full 
 default
 

Returns:
String

setFormat

public void setFormat(String format)
Sets the display format (Used for date format only).
 short 
 medium 
 long 
 full 
 default
 

Parameters:
format - The format to set

setActionRef

public void setActionRef(String string)
Used Internaly only

Parameters:
string -

getActionRef

public String getActionRef()
Used Internaly only

Returns:

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Attribute
Throws:
CloneNotSupportedException

getHAlign

public String getHAlign()
Return the HAlignment for the DisplayAttribute
        CENTER
  LEFT
        RIGHT
        JUSTIFY
 

Returns:
One of the String indicated above

getVAlign

public String getVAlign()
Returns the desired VAligment for the DisplayAttribute
        BASELINE
  BOTTOM
        MIDDLE
        TOP
 

Returns:
One of the String indicated above

setHAlign

public void setHAlign(String string)
Indicate the HAlignment for the DisplayAttribute
        CENTER
  LEFT
        RIGHT
        JUSTIFY
 

Parameters:
string - One of the String indicated above

setVAlign

public void setVAlign(String string)
Indicate the Vertical Alignment for the DisplayAttribute
        BASELINE
  BOTTOM
        MIDDLE
        TOP
 

Parameters:
string - One of the String indicated above

setReferenceBundle

public void setReferenceBundle(String refBundle)
Used internaly

Parameters:
refBundle -

getReferenceBundle

public String getReferenceBundle()
Used internaly

Returns:

getImageMapping

public ImageMapping getImageMapping()
This will define a mapping between data and images to be displayed. Can be used when the data set is known to be a fixed (ENUM) type. Can map the data to a image or to a text string. Can also be used to populate a selection list when display attribute type is DropdownListBox for example.

Returns:

setImageMapping

public void setImageMapping(ImageMapping mapping)
Parameters:
mapping -
See Also:
#getDataMapping

getMenuItemCollection

public MenuItemCollection getMenuItemCollection()
This is the menu items which will be assiociated with this display Attribute.

Returns:

setMenuItemCollection

public void setMenuItemCollection(MenuItemCollection collection)
Parameters:
collection -

getMaxTextWidth

public int getMaxTextWidth()
Get the max number of characters which should be displayed in the UWL Table. If the text exceeds this max size then it will truncate the text and add ... to the end. A tooltip will be add to the component with the full text.

Returns:
0 if full text should be displayed else the max number of characters

setMaxTextWidth

public void setMaxTextWidth(int i)
Set the max number of characters to be displayed in the UWL Table. Set to 0 or a negative value to display all of the Text.

Parameters:
i -

isGlobal

public boolean isGlobal()
Deprecated. no longer used

Used Internaly only

Returns:
if this display attribute is defined independent of the views

setGlobal

public void setGlobal(boolean b)
Deprecated. no longer used

Used Internaly only

Parameters:
if - this display attribute is defined independent of the views

isHeaderDisplayable

public boolean isHeaderDisplayable()
Indicates if the Column header should be displayed or not.

Returns:

setHeaderDisplayable

public void setHeaderDisplayable(boolean b)
Parameters:
b -
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api - EP-BC-UWL
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api default EP-BC-UWL


Copyright 2011 SAP AG Complete Copyright Notice