skip to main content
Defense > Programmer's documentation > Essential Features > Graphic objects > User properties of graphic objects
 
User properties of graphic objects
A set of user properties can be associated with graphic objects. User properties are a set of key-value pairs, where the key is a String object and the value may be any kind of information value. These user property methods of the class IlvGraphic let you easily connect information that comes from your application to your graphic objects. You can keep track of the graphic part of your application by storing the references to objects you create and connecting this graphic part to the application by means of user properties, as in the following example:
 
Integer index = new Integer(10);
String key = "objectIndex";
myobject.setProperty(key, index);
The following IlvGraphic methods help you manage the properties of an object:
 
public boolean hasProperty(String key, Object value)
 
public boolean removeProperty(String key)
 
public Object getProperty(String key)
 
public boolean replaceProperty(String key, Object value)
 
public void setProperty(String key, Object value)

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.