API specifications of NAB framework June 21, 2006
Contents Previous

Chapter 5 NAB Framework API Reference

5.6 INtkInstanceManager(Toolkit Instance Manager)

INtkInsntanceManager defines the interface used to access NTK instance information required for building an NTK application in NAB Framework.

An instance of the implementation class of this interface is set in NtkManager, and it operates under the control of NtkManager.

Implementation example: MwtInstanceManager

 

Generally, the following interfaces can be used:

Table: Interfaces related to file input/output of instance information

Method name

Outline

long readInstanceDataFile(String folder,String fname,int flag)

Reads instance information from the specified file.

int saveInstanceDataFile(String path,long inst,int encoding)

Writes instance information to the specified file.

int loadLibrary(String libname)

Reads the library of the specified name.

Table: Interfaces related to creating/discarding instances

Method name

Outline

int setNewInstanceClassName(String className)

Sets a name for the NTK class to be created.

long getNewInstance(String className,String instanceName,long parent)

Acquires the ID of a created NTK instance.

int deleteInstance(long inst)

Deletes the interface specified in inst.

long getInstance(String className,String instanceName)

Acquires the NTK instance ID of the specified class name and instance name.

long checkInstanceName(long id,String name)

Checks whether the instance of the specified ID has the correct name.

long checkProcedureName(String pname)

Checks whether a name is correct as a procedure name.

int setNewInstancePositionMode(boolean fl)

Sets whether the mode enables an instance to be created with mouse operations.

int pasteInstance(long inst,long inst2)

Copies the instance specified in inst2 and pastes it over the instance specified in inst.

Table: Interfaces related to instance management

Method name

Outline

void setSelectedInstance(long inst)

Sets the selected instance ID.

boolean existInstance(long inst)

Checks whether an instance is correct. If it is correct, a true value is returned.

int setInstanceId(int kind, long id)

Sets an instance ID for the specified management information.

long getInstanceId(long id, int kind,long val)

Acquires the instance ID that is set in the specified information.

int setupInstance(long inst)

Initializes an instance.

String getInstanceData(long id,int kind,long val,int encode)

Removes instance information from the specified management information.

ArrayList setCopyList(ArrayList inst)

Sets a list of instances to be copied.

ArrayList getCopyList()

Sets a list of instances to be copied.

ArrayList setDeleteList(ArrayList inst)

Sets a list of instances to be deleted.

ArrayList getDeleteList()

Acquires a list of instances to be deleted.

Table: Interfaces related to instance operation and information acquisition settings

Method name

Outline

int redraw(long inst)

Redraws the specified instance.

int getInstanceType(long inst)

Acquires the instance type.

String getClassName(long inst)

Acquires an instance class name.

int setProperty(long inst, String prop,int val)

Sets a property value of the int type for an instance.

int setProperty(long inst, String prop,String val)

Sets a property value of the String type for an instance.

int getProperty(long inst, String prop)

Acquires a property value of an instance in the form of an int-type value.

String getProperty(long inst, String prop, int encoding)

Acquires a property of an instance in the form of a String-type value.

boolean existProperty(long inst, String prop)

Checks whether a property exists. When the return value is "true," this indicates that the property exists.

boolean existTrigger(long id, int trig)

Checks whether a trigger exists. When the return value is "true," this indicates that the trigger exists.

int getExtTriggerList(long id,ArrayList namelist,ArrayList trglist)

Acquires a list of extension triggers.

int setUserLongData(long inst,String prop,long val)

Sets a Long value for an instance.

long getUserLongData(long inst,String prop)

Acquires the Long value that is set for an instance.

int setUserStringData(long inst, String prop,String val)

Sets a String value for an instance.

String getUserStringData(long inst, String prop)

Acquires the String value that is set for an instance.

int setVisible(long inst,boolean fl)

Sets the instance display status.

Long getParentWindow(long inst)

Acquires the parent window of an instance.

Long getParent(long inst)

Acquires the parent instance of an instance.

Table: Interfaces related to event procedure settings

Method name

Outline

int addProcedure(long id, String procedureName, String functionName, int triggerNum)

Sets another event procedure for an instance. It returns a procedure ID.

int delProcedure(long id,long procid)

Deletes the event procedure that is set for an instance and has the specified procedure ID.

int configureProcedure(long procId,String procedureName, String functionName, int triggerNum)

Sets again the event procedure that is set for an instance and has the specified procedure ID.

String getProcedureName(long procId)

Acquires the procedure name of the event procedure whose procedure ID is specified.

String getFunctionName(long procId)

Acquires the procedure function name of the event procedure whose procedure ID is specified.

int getTrigger(long procId)

Acquires the trigger of the event procedure whose procedure ID is specified.

String getProcedureAttribute(long procId,String attr)

Acquires the attribute value of the event procedure whose procedure ID is specified.

int setProcedureName(long procId,String pname)

Sets a procedure name.

int setFunctionName(long procId,String fname)

Sets a procedure function name.

int setTrigger(long procId,int trigger)

Sets a trigger.

int setProcedureAttribute(long procId,String attr,String val)

Sets a procedure attribute.


Contents Previous

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006