BBjControl::putClientProperty

Description

In BBj 17.00 and higher, this method sets a client property on the BBjControl.

Syntax

Return Value Method
void putClientProperty(Object key, Object value)

void

putClientProperty(Object key, Object value)

Parameters

Parameter Description
value Specifies the value of that property.

Return Value

None.

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.

DWC logo

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 ' putClientProperty

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.