cz.cmc.tcgui.dataif
Interface TCImport

All Known Implementing Classes:
TCEditor

public interface TCImport

Title: interface TCImport

Description: via TCImport it is possible to modify the structure and data of the TC schema

Copyright: Copyright (c) 2003

Company: CMC Computers


Method Summary
 void addFilter(FilterContainer fc, Filter f)
          Adds the filter to the FilterContainer
 void addFilterElement(Filter f, FilterElement fe)
          Adds the filter element to the Filter
 void addTCObject(TCObject tco)
          Adds TCObject to the schema
 void applyTCAttributes(TCObject tco, Map map)
          Applies attributes for given TCObject Keys are AttributeInstances or Strings, values are basic java objects as Float, Boolean, Integer, String, java.util.Set; the datadef object has key TCGraphConstants.DATADEFINITION
 void applyViewAttributes(TCObject tco, Map map)
          Applies given view attributes for given TCObject Keys are strings, values are basic java objects as Float, Boolean, Integer, String, java.awt.Rectangle, java.awt.Point
 void attachQDisc(Class c, QDisc qd)
          Attaches the given QDisc to the given class.
 void attachSubclass(SubclassableTCObject stco, Class c)
          Attaches the given subclass to the given SubclassableTCObject.
 void clearSchema()
          Empties the whole schema
 void connectFilterMatch(FilterElement fe, Class c)
          Connects filter element to the matching class Throws exception if the Class is not a subclass of the ClassfulQDisc owning the FilterElement.
 void detachAllSubclasses(SubclassableTCObject stco)
          Dettaches all subclasses of the given SubclassableTCObject.
 void detachFilter(Filter f)
          Removes the Filter from its FilterContainer
 void detachFilterElement(FilterElement fe)
          Removes the FilterElement from its Filter
 void detachQDisc(Class c)
          Detaches the QDisc attached to the given Class.
 void detachQDisc(QDisc qd)
          Detaches the given QDisc from the Class it is attached on.
 void detachSubclass(Class c)
          Detaches the given class from its parent SubclassableTCObject.
 void disconnectFilterMatch(FilterElement fe)
          Disconnects the FilterElement from the matching Class counterpart
 void disconnectFilterMatches(Class c)
          Disconnects the Class from matching FilterElements.
 UndoableEditSupport getUndoableEditSupport()
           
 void insertFilterAt(FilterContainer fc, Filter f, int index)
          Inserts the filter into the FilterContainer onto the given position
 void insertFilterElementAt(Filter f, FilterElement fe, int index)
          Inserts the filter element into the Filter onto the given position
 void removeTCAttributes(TCObject tco)
          Removes all TC attributes from the given TCObject
 void removeTCAttributes(TCObject tco, Object[] keys)
          Remove TC attributes from the given TCObject
 void removeTCObject(TCObject tco)
          Removes TCObject from the schema
 void removeViewAttributes(TCObject tco)
          Removes all view attributes from the given TCObject
 void removeViewAttributes(TCObject tco, Object[] keys)
          Remove view attributes from the given TCObject
 void setDevice(String device)
          Sets the device name
 void setTCObjectID(TCObject tco, int id)
          Sets id of the TCObject.
 

Method Detail

getUndoableEditSupport

public UndoableEditSupport getUndoableEditSupport()
Returns:
undoable edit support instance or null if no UndoableEditSupport available

setDevice

public void setDevice(String device)
Sets the device name

Parameters:
device - device name to be set

addTCObject

public void addTCObject(TCObject tco)
Adds TCObject to the schema


removeTCObject

public void removeTCObject(TCObject tco)
Removes TCObject from the schema


setTCObjectID

public void setTCObjectID(TCObject tco,
                          int id)
Sets id of the TCObject. The ID must be uniqie within schema.


clearSchema

public void clearSchema()
Empties the whole schema


applyTCAttributes

public void applyTCAttributes(TCObject tco,
                              Map map)
Applies attributes for given TCObject Keys are AttributeInstances or Strings, values are basic java objects as Float, Boolean, Integer, String, java.util.Set; the datadef object has key TCGraphConstants.DATADEFINITION

Parameters:
tco - TCObject to be attributes applied to
map - attributes to be applied

removeTCAttributes

public void removeTCAttributes(TCObject tco,
                               Object[] keys)
Remove TC attributes from the given TCObject

Parameters:
keys - keys of attributes to be removed

removeTCAttributes

public void removeTCAttributes(TCObject tco)
Removes all TC attributes from the given TCObject


applyViewAttributes

public void applyViewAttributes(TCObject tco,
                                Map map)
Applies given view attributes for given TCObject Keys are strings, values are basic java objects as Float, Boolean, Integer, String, java.awt.Rectangle, java.awt.Point

Parameters:
tco - TCObject to be attributes applied to
map - attributes to be applied

removeViewAttributes

public void removeViewAttributes(TCObject tco,
                                 Object[] keys)
Remove view attributes from the given TCObject

Parameters:
keys - keys of attributes to be removed

removeViewAttributes

public void removeViewAttributes(TCObject tco)
Removes all view attributes from the given TCObject


attachSubclass

public void attachSubclass(SubclassableTCObject stco,
                           Class c)
Attaches the given subclass to the given SubclassableTCObject. If a QDisc was attached on the class, it would be disconnected.

Parameters:
stco - Class or ClassfulQDisc to attach class on
c - Class to be attached

detachSubclass

public void detachSubclass(Class c)
Detaches the given class from its parent SubclassableTCObject.

Parameters:
c - Class to be dettached

detachAllSubclasses

public void detachAllSubclasses(SubclassableTCObject stco)
Dettaches all subclasses of the given SubclassableTCObject.

Parameters:
stco - Class or ClassfulQDisc to detach class from

attachQDisc

public void attachQDisc(Class c,
                        QDisc qd)
Attaches the given QDisc to the given class. If something was attached on the class, it would be removed. If the qdisc was attached on a class, it would be detached.

Parameters:
c - class to attach the QDisc on
qd - QDisc to attach

detachQDisc

public void detachQDisc(Class c)
Detaches the QDisc attached to the given Class.

Parameters:
c - Class whose QDisc is to be detached

detachQDisc

public void detachQDisc(QDisc qd)
Detaches the given QDisc from the Class it is attached on.

Parameters:
qd - QDisc to detach

addFilter

public void addFilter(FilterContainer fc,
                      Filter f)
Adds the filter to the FilterContainer

Parameters:
fc - FilterContainer to add filter to
f - Filter to add

insertFilterAt

public void insertFilterAt(FilterContainer fc,
                           Filter f,
                           int index)
Inserts the filter into the FilterContainer onto the given position

Parameters:
fc - FilterContainer to add filter to
f - Filter to add
index - position to insert the filter at

detachFilter

public void detachFilter(Filter f)
Removes the Filter from its FilterContainer

Parameters:
f - filter to detach

addFilterElement

public void addFilterElement(Filter f,
                             FilterElement fe)
Adds the filter element to the Filter

Parameters:
f - Filter to add the element to
fe - FilterElement to add

insertFilterElementAt

public void insertFilterElementAt(Filter f,
                                  FilterElement fe,
                                  int index)
Inserts the filter element into the Filter onto the given position

Parameters:
f - Filter to add the element to
fe - Filter to add
index - position to insert the filter element at

detachFilterElement

public void detachFilterElement(FilterElement fe)
Removes the FilterElement from its Filter


connectFilterMatch

public void connectFilterMatch(FilterElement fe,
                               Class c)
Connects filter element to the matching class Throws exception if the Class is not a subclass of the ClassfulQDisc owning the FilterElement.

Parameters:
fe - matched FilterElement
c - matching Class
Throws:
InvalidConnectionException

disconnectFilterMatch

public void disconnectFilterMatch(FilterElement fe)
Disconnects the FilterElement from the matching Class counterpart

Parameters:
fe - FilterElement to be disconnected

disconnectFilterMatches

public void disconnectFilterMatches(Class c)
Disconnects the Class from matching FilterElements.

Parameters:
c - Class to be disconnected