Class UISWTViewBuilderCore
java.lang.Object
com.biglybt.ui.swt.pifimpl.UISWTViewBuilderCore
- All Implemented Interfaces:
UISWTViewBuilder
Holds information to create a real
UISWTViewEventListener.
Also holds things like PluginInterface reference, initial datasource, title, id.-
Nested Class Summary
Nested classes/interfaces inherited from interface UISWTViewBuilder
UISWTViewBuilder.UISWTViewEventListenerInstantiator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Reference<Class<? extends UISWTViewEventListener>> private Objectprivate booleanprivate Stringprivate UISWTViewEventListenerprivate final Map<UISWTView, Reference<UISWTViewEventListener>> private Stringprivate Reference<PluginInterface> private Stringprivate final Stringprivate String -
Constructor Summary
ConstructorsConstructorDescriptionUISWTViewBuilderCore(String viewID, PluginInterface pi) UISWTViewBuilderCore(String viewID, PluginInterface pi, UISWTViewEventListener listener) Deprecated.UISWTViewBuilderCore(String viewID, PluginInterface pi, Class<? extends UISWTViewEventListener> cla) Convenience constructor for creating a builder with a simple class. -
Method Summary
Modifier and TypeMethodDescriptioncreateEventListener(UISWTView view) voiddispose()Closes all views.voidbooleanClass<? extends UISWTViewEventListener> booleanCan we create multiple views using this builder?booleanisListenerOfClass(Class ofClass) voidsetDefaultVisibility(boolean b) setInitialDatasource(Object datasource) Set the very first datasource the view sees.setInitialTitle(String initialTitle) Sometimes the title is needed even before an instance is created.setListenerClass(Class<? extends UISWTViewEventListener> cla) Sets aUISWTViewEventListenerclass that will be created when the UI shows the view.setListenerInstantiator(UISWTViewBuilder.UISWTViewEventListenerInstantiator listenerInstantiator) Advanced creation of aUISWTViewEventListener.setParentEntryID(String parentEntryID) Place this entry under the parentEntryID, if UI supports it.
Sidebar can have multiple levels of views, but Tabbed MDI places all views at the same level.setPreferredAfterID(String preferredAfterID) voidsetViewSubID(String sid)
-
Field Details
-
listener
-
mapViewToListener
-
pi_ref
-
datasource
-
viewID
-
viewSubID
-
cla_ref
-
initialTitle
-
preferredAfterID
-
listenerInstantiator
-
parentEntryID
-
defaultVisibility
private boolean defaultVisibility
-
-
Constructor Details
-
UISWTViewBuilderCore
-
UISWTViewBuilderCore
public UISWTViewBuilderCore(String viewID, PluginInterface pi, Class<? extends UISWTViewEventListener> cla) Convenience constructor for creating a builder with a simple class.
Same asUISWTViewBuilderCore(String, PluginInterface).setListenerClass(Class) -
UISWTViewBuilderCore
Deprecated.Useinvalid reference
UISWTViewBuilder#setListenerInstantiator(boolean, UISWTViewEventListenerInstantiator)
-
-
Method Details
-
cloneBuilder
-
isListenerOfClass
-
getPluginInterface
-
setViewSubID
- Specified by:
setViewSubIDin interfaceUISWTViewBuilder
-
getViewSubID
-
getInitialDataSource
-
setInitialDatasource
Description copied from interface:UISWTViewBuilderSet the very first datasource the view sees. Views can retrieve this first datasource even after the datasource changes usingUISWTView.getInitialDataSource()- Specified by:
setInitialDatasourcein interfaceUISWTViewBuilder
-
createEventListener
-
getViewID
-
getListener
-
dispose
public void dispose()Closes all views. Clears listener and datasource -
disposeViews
public void disposeViews() -
getListenerClass
-
setListenerClass
Description copied from interface:UISWTViewBuilderSets aUISWTViewEventListenerclass that will be created when the UI shows the view.
Since this class will be instantiated with cla.newInstance(), the class must be a top-level class, and not a local or non-static nested class.- Specified by:
setListenerClassin interfaceUISWTViewBuilder
-
getInitialTitle
-
setInitialTitle
Description copied from interface:UISWTViewBuilderSometimes the title is needed even before an instance is created. For example, menu items that open views- Specified by:
setInitialTitlein interfaceUISWTViewBuilder
-
setListenerInstantiator
public UISWTViewBuilderCore setListenerInstantiator(UISWTViewBuilder.UISWTViewEventListenerInstantiator listenerInstantiator) Description copied from interface:UISWTViewBuilderAdvanced creation of aUISWTViewEventListener. Try not to use :)- Specified by:
setListenerInstantiatorin interfaceUISWTViewBuilder- Parameters:
listenerInstantiator- called when a newUISWTViewis created
-
getListenerInstantiator
- Specified by:
getListenerInstantiatorin interfaceUISWTViewBuilder
-
setPreferredAfterID
- Parameters:
preferredAfterID- If you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'- Returns:
-
getPreferredAfterID
-
getParentEntryID
-
setParentEntryID
Description copied from interface:UISWTViewBuilderPlace this entry under the parentEntryID, if UI supports it.
Sidebar can have multiple levels of views, but Tabbed MDI places all views at the same level.- Specified by:
setParentEntryIDin interfaceUISWTViewBuilder
-
getDefaultVisibility
public boolean getDefaultVisibility() -
setDefaultVisibility
public void setDefaultVisibility(boolean b) -
isListenerCloneable
public boolean isListenerCloneable()Can we create multiple views using this builder? -
toDebugString
-
invalid reference