BBjControl::getClientProperty

Description

In BBj 17.00 and higher, this method returns a client property previously set on the BBjControl with BBjControl::putClientProperty.

Syntax

Return Value Method
Object getClientProperty(Object key)

Parameters

Parameter Description
key Specifies a client property to be retrieved from the control.

Return Value

Returns the value of this property.

Remarks

This functionality is primarily intended for setting low-level control properties in GUI (Java Swing controls), typically simple numbers or strings, and usually specific to a particular look and feel.

When running in DWC, it can be used to set DWC component attributes, but in BBj 24.00 and higher, the newer setProperty and getProperty methods are preferred. Those newer methods are required when working with property values that aren't Serializable objects.

Example

rem ' getClientProperty

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,200,300,"BBjTree",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
tree! = window!.addTree(101,10,10,180,280)

rem ' This property is only meaningful with -LFcross
rem ' https://docs.oracle.com/javase/tutorial/uiswing/components/tree.html
print tree!.getClientProperty("JTree.lineStyle")
tree!.putClientProperty("JTree.lineStyle","None")
print tree!.getClientProperty("JTree.lineStyle")
root = 100
tree!.setRoot(root,"Root")
tree!.addExpandableNode(root+1,root,"Parent")
for i = 1 to 10
    tree!.addNode(i,root+1,"Child "+str(i))
next i
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.