2
Fork 0

[svn r346] WIP, with working x4o and simple ldap backend for listing end editing entries

This commit is contained in:
willemc 2008-11-18 22:04:23 +01:00
parent 5d64bde0bd
commit f401b61a6c
60 changed files with 1756 additions and 585 deletions

View file

@ -49,7 +49,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
@ -67,9 +66,14 @@ import com.idcanet.fff.SwingImageHelper;
import com.idcanet.vasc.core.AbstractVascFrontend;
import com.idcanet.vasc.core.VascEntry;
import com.idcanet.vasc.core.VascEntryField;
import com.idcanet.vasc.core.VascFrontendData;
import com.idcanet.vasc.core.actions.GlobalVascAction;
import com.idcanet.vasc.core.actions.RowVascAction;
import com.idcanet.vasc.core.entry.VascEntryExporter;
import com.idcanet.vasc.core.ui.VascUIComponent;
import com.idcanet.vasc.frontends.swing.ui.SwingLabel;
import com.idcanet.vasc.frontends.swing.ui.SwingList;
import com.idcanet.vasc.frontends.swing.ui.SwingText;
/**
*
@ -86,6 +90,25 @@ public class SwtVascFrontend extends AbstractVascFrontend {
this.parent=parent;
}
/**
* Add swt implmented ui components
*/
protected void addUiComponents() {
VascFrontendData vfd = getVascEntry().getVascFrontendData();
// required UI components
vfd.putVascUIComponent(VascUIComponent.VASC_LABEL,SwingLabel.class.getName());
vfd.putVascUIComponent(VascUIComponent.VASC_TEXT, SwingText.class.getName());
vfd.putVascUIComponent(VascUIComponent.VASC_LIST, SwingList.class.getName());
// optional UI components
//vfd.putVascUIComponent(VascUIComponent.VASC_BOOLEAN , SwingBoolean.class.getName());
//vfd.putVascUIComponent(VascUIComponent.VASC_DATE , SwingDate.class.getName());
//vfd.putVascUIComponent(VascUIComponent.VASC_TEXTAREA, SwingTextArea.class.getName());
//vfd.putVascUIComponent(VascUIComponent.VASC_COLOR, SwingColorChooser.class.getName());
}
private static final String[] FILTER_NAMES = {
"All Files (*.*)",
"Comma Separated Values Files (*.csv)",
@ -240,10 +263,10 @@ public class SwtVascFrontend extends AbstractVascFrontend {
for(VascEntryField c:entry.getVascEntryFields()) {
Label l = new Label(body, SWT.WRAP);
l.setText(c.getName());
l.setText(i18n(c.getName()));
if(c.getDescription()!=null) {
l.setToolTipText(c.getDescription());
l.setToolTipText(i18n(c.getDescription()));
}
try {