Methods Summary |
---|
public void | closeView()
try {
UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
if (uiFunctions != null) {
uiFunctions.closePluginView(this);
}
} catch (Exception e) {
Debug.out(e);
}
|
public void | dataSourceChanged(java.lang.Object newDataSource)
dataSource = newDataSource;
triggerEvent(UISWTViewEvent.TYPE_DATASOURCE_CHANGED, newDataSource);
|
public void | delete()
triggerEvent(UISWTViewEvent.TYPE_DESTROY, null);
super.delete();
|
public org.eclipse.swt.widgets.Composite | getComposite()
if (bFirstGetCompositeCall) {
bFirstGetCompositeCall = false;
}
return composite;
|
public java.lang.String | getData()
final String key = CFG_PREFIX + sViewID + ".title";
if (MessageText.keyExists(key))
return key;
// For now, to get plugin developers to update their plugins
// return key;
// For release, change it to this, to make it at least shorter:
return sViewID;
|
public java.lang.Object | getDataSource()
return dataSource;
|
public java.lang.String | getFullTitle()
if (sTitle != null)
return sTitle;
return super.getFullTitle();
|
public java.lang.String | getParentID()
return sParentID;
|
public java.lang.String | getViewID()
return sViewID;
|
public void | initialize(org.eclipse.swt.widgets.Composite parent)
if (iControlType == UISWTView.CONTROLTYPE_SWT) {
composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout(1, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
composite.setLayout(layout);
GridData gridData = new GridData(GridData.FILL_BOTH);
composite.setLayoutData(gridData);
triggerEvent(UISWTViewEvent.TYPE_INITIALIZE, composite);
if (composite.getLayout() instanceof GridLayout) {
// Force children to have GridData layoutdata.
Control[] children = composite.getChildren();
for (int i = 0; i < children.length; i++) {
Control control = children[i];
Object layoutData = control.getLayoutData();
if (layoutData == null || !(layoutData instanceof GridData)) {
if (layoutData != null)
Logger.log(new LogEvent(LogIDs.PLUGIN, LogEvent.LT_WARNING,
"Plugin View '" + sViewID + "' tried to setLayouData of "
+ control + " to a " + layoutData.getClass().getName()));
if (children.length == 1)
gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
else
gridData = new GridData();
control.setLayoutData(gridData);
}
}
}
} else {
composite = new Composite(parent, SWT.EMBEDDED);
FillLayout layout = new FillLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
composite.setLayout(layout);
GridData gridData = new GridData(GridData.FILL_BOTH);
composite.setLayoutData(gridData);
Frame f = SWT_AWT.new_Frame(composite);
Panel pan = new Panel();
f.add(pan);
triggerEvent(UISWTViewEvent.TYPE_INITIALIZE, pan);
}
if (composite != null) {
composite.addListener(SWT.Activate, new Listener() {
public void handleEvent(Event event) {
triggerEvent(UISWTViewEvent.TYPE_FOCUSGAINED, null);
}
});
composite.addListener(SWT.Deactivate, new Listener() {
public void handleEvent(Event event) {
triggerEvent(UISWTViewEvent.TYPE_FOCUSLOST, null);
}
});
}
|
public void | refresh()
triggerEvent(UISWTViewEvent.TYPE_REFRESH, null);
|
public boolean | requestClose()
return triggerEvent2(UISWTViewEvent.TYPE_CLOSE, null);
|
public void | setControlType(int iControlType)
if (iControlType == UISWTView.CONTROLTYPE_AWT
|| iControlType == UISWTView.CONTROLTYPE_SWT)
this.iControlType = iControlType;
|
public void | setTitle(java.lang.String title)
sTitle = title;
|
public void | triggerEvent(int eventType, java.lang.Object data)
try {
eventListener.eventOccurred(new UISWTViewEventImpl(this, eventType, data));
} catch (Throwable t) {
throw (new UIRuntimeException("UISWTView.triggerEvent:: ViewID="
+ sViewID + "; EventID=" + eventType + "; data=" + data, t));
}
|
private boolean | triggerEvent2(int eventType, java.lang.Object data)
try {
return eventListener.eventOccurred(new UISWTViewEventImpl(this, eventType, data));
} catch (Throwable t) {
throw (new UIRuntimeException("UISWTView.triggerEvent:: ViewID="
+ sViewID + "; EventID=" + eventType + "; data=" + data, t));
}
|
public void | updateLanguage()
super.updateLanguage();
triggerEvent(UISWTViewEvent.TYPE_LANGUAGEUPDATE, null);
|