|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.skeleton.container.swt.SwtRepositoryUtil
This utility class can be used in order to build a repository corresponding to elements xml definition files.
Instances of SwtRepositoryUtil are created using the default
constructor, but one should keep in mind that SwtRepositoryUtil
is implementing the Disposable interface and therefore that
the method should be called in order to
free internally held resources.
dispose()
Refer to the method for more information.
dispose()
| Constructor Summary | |
SwtRepositoryUtil(ApplicationFrame appFrame,
SlidePanelListener spListener)
Default constructor. |
|
| Method Summary | |
void |
buildRepository(org.eclipse.swt.widgets.Composite slideRepository,
java.io.File file,
ActionSwtRepositoryItem.ClickActionProvider clickActionProvider)
Builds a repository using the data contained in the elements definition file file. |
void |
buildSlideRepository(org.eclipse.swt.widgets.Composite parent,
java.lang.String path,
java.lang.Class refClass,
ActionSwtRepositoryItem.ClickActionProvider clickActionProvider)
Builds a repository using the data contained in the elements definition file which can be found at path. |
void |
dispose()
Use this method in order to dispose the SWT resources held by instance of classes implementing the interface.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwtRepositoryUtil(ApplicationFrame appFrame,
SlidePanelListener spListener)
Default constructor. One should call the dispose() method
once the created instance is no longer required.
appFrame - the ApplicationFrame contextspListener - the SlidePanelListener to add to newly created
SlidePanels. Specifying null
means that no listener is added.| Method Detail |
public void buildRepository(org.eclipse.swt.widgets.Composite slideRepository,
java.io.File file,
ActionSwtRepositoryItem.ClickActionProvider clickActionProvider)
throws XMLParseException,
ReadException
Builds a repository using the data contained in the elements definition
file file.
NOTE:the parent composite should use a GridLayout.
If not it will be automatically set.
slideRepository - the Composite containing the repositoryfile - the elements definition fileclickActionProvider - the ClickActionProvider instance
to add to each generated item
XMLParseException - thrown if the elements definition file is not correctly
formatted
ReadException - thrown if an error occured while reading the elements
definition file
public final void buildSlideRepository(org.eclipse.swt.widgets.Composite parent,
java.lang.String path,
java.lang.Class refClass,
ActionSwtRepositoryItem.ClickActionProvider clickActionProvider)
throws ReadException
Builds a repository using the data contained in the elements definition
file which can be found at path.
NOTE:the parent composite should use a GridLayout.
If not it will be automatically set.
parent - the Composite containing the repositorypath - the path to the elements definition file, relative to
refClassrefClass - the class used to retrieve the elements definition fileclickActionProvider - the ClickActionProvider instance
to add to each generated item
XMLParseException - thrown if the elements definition file is not correctly
formatted
ReadException - thrown if an error occured while reading the elements
definition filepublic void dispose()
Disposable
Use this method in order to dispose the SWT resources held by instance of
classes implementing the interface.
Disposable
dispose in interface Disposable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||