// form
FormBuilder f = new FormBuilder("project.left");
// add basics
f.addHeader("main", new FormHeader(YAamsCore.NAME, "yaams").setSorting(-2));
f.addElement("main.opts", new FormButton(I18N.t("Options"), "opts", new AE() {
@Override
public void run() {
YaFrame.open(HomeTab.OPTIONS);
}
}));
f.addElement("main.plugins", new FormButton(I18N.t("Plugins"), "plugin", new AE() {
@Override
public void run() {
BasicTabEvent.openPlugin();
}
}).setSorting(1));
f.addElement("main.feedback", new FormButton(I18N.t("Feedback"), "mail_web", new AE() {
@Override
public void run() {
BasicTabEvent.openFeedback();
}
}).setSorting(2));
// has project?
if (p != null) {
// main elements
f.getHeader("basic").setTitle(p.getTitle()).setIcon(p.getIcon()).setCollapsed(true).setSorting(-1);
f.addElement("basic.type", new FormInfo(I18N.t("Typ"), p.getType().getTitle()));
// aktions
f.addHeader("action", new FormHeader(I18N.t("Aktionen"), "mouse"));
f.addElement("action.tab", new FormButton(I18N.t("Im Tab öffnen"), "tab_arrow", new AE() {
@Override
public void run() {
doubleClick();
}
}).setSorting(-2));
f.addElement("action.edit", new FormButton(I18N.t("Konfigurieren"), "opts", new AE() {
@Override
public void run() {
config();
}
}).setSorting(-1));
f.addElement("action.del", new FormButton(I18N.t("Löschen"), "trash", new AE() {
@Override
public void run() {
del();
}
}));
// add addons
p.getType().leftForm(f, p);
// show
ppanel.setLeft(f.getPanel(true));
} else {
f.getHeader("basic").setTitle("Erste Schritte").setIcon("help");
// aktions
f.addElement("basic.add", new FormButton(I18N.t("Erstellen"), "project_add", new AE() {
@Override
public void run() {
add();
}
}));
f.addElement("basic.open", new FormButton(I18N.t("Importieren"), "folder", new AE() {
@Override
public void run() {
open();