Differences
This shows you the differences between two versions of the page.
association_editor [2012/04/09 17:49] dragan.milicev |
association_editor [2012/07/09 10:50] (current) srdjan.lukovic [GUI Code] |
||
---|---|---|---|
Line 38: | Line 38: | ||
import rs.sol.soloist.server.guiconfiguration.components.GUIPanelComponent; | import rs.sol.soloist.server.guiconfiguration.components.GUIPanelComponent; | ||
import rs.sol.soloist.server.guiconfiguration.construction.GUIComponentBinding; | import rs.sol.soloist.server.guiconfiguration.construction.GUIComponentBinding; | ||
- | import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUIElementComponent; | + | import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUIEdit; |
- | import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUIListWidget; | + | |
- | import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUISlotEditorKind; | + | |
- | import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUISlotValueInput; | + | |
- | import rs.sol.soloist.server.guiconfiguration.layout.CellLayoutData; | + | |
import rs.sol.soloist.server.guiconfiguration.layout.TableLayoutData; | import rs.sol.soloist.server.guiconfiguration.layout.TableLayoutData; | ||
import rs.sol.soloist.server.guiconfiguration.nonvisualcompoments.GUIFindSingleInstanceSAPComponent; | import rs.sol.soloist.server.guiconfiguration.nonvisualcompoments.GUIFindSingleInstanceSAPComponent; | ||
Line 60: | Line 56: | ||
{ | { | ||
GUIApplicationComponent page = new GUIApplicationComponent(); | GUIApplicationComponent page = new GUIApplicationComponent(); | ||
- | page.name.set(Text.fromString("AssociationEditor")); | + | page.setName("AssociationEditor"); |
SoloistServiceServlet.registerApplication(page); | SoloistServiceServlet.registerApplication(page); | ||
- | page.context.set(createContextAndStyles()); | + | page.setContext(createContextAndStyles()); |
GUIPanelComponent root = GUIPanelComponent.createFlow(page); | GUIPanelComponent root = GUIPanelComponent.createFlow(page); | ||
GUILabelComponent title = GUILabelComponent.create(root, "Association Editor"); | GUILabelComponent title = GUILabelComponent.create(root, "Association Editor"); | ||
- | title.styleName.set(Text.fromString("titleStyle")); | + | title.setStyle("titleStyle"); |
GUIPanelComponent topPanel = GUIPanelComponent.createFlow(root); | GUIPanelComponent topPanel = GUIPanelComponent.createFlow(root); | ||
- | topPanel.styleName.set(Text.fromString("topPanel")); | + | topPanel.setStyle("topPanel"); |
GUIPanelComponent table = GUIPanelComponent.createTable(topPanel); // panel with table layout | GUIPanelComponent table = GUIPanelComponent.createTable(topPanel); // panel with table layout | ||
Line 76: | Line 72: | ||
Person.FQ_TYPE_NAME, | Person.FQ_TYPE_NAME, | ||
Person.FQPropertyNames.desc, | Person.FQPropertyNames.desc, | ||
- | (ClassifierInstanceDescriptor)ElementDescriptor.create(Text.fromString(ObjectSpaceInit.JANNE_ROE_IDENTIFIER)), | + | (ClassifierInstanceDescriptor)ElementDescriptor.create(Text.fromString(ObjectSpaceInit.JANNE_ROE_IDENTIFIER))); |
- | false); | + | |
- | GUIElementComponent editList = GUIElementComponent.create(table, GUISlotEditorKind.create(Person.PROPERTIES.successfulAdvisers), new GUIListWidget(), GUISlotValueInput.create(Person.PROPERTIES.myBankAdvisers), new TableLayoutData(0, 0)); | + | GUIEdit editList = GUIEdit.createList(table, Person.PROPERTIES.successfulAdvisers, Person.PROPERTIES.myBankAdvisers); |
- | GUIComponentBinding.create(findJanneRoe.value, GUISlotEditorKind.get(editList).element); | + | editList.setLayoutData(TableLayoutData.create(0, 0)); |
- | GUIComponentBinding.create(findJanneRoe.value, GUISlotValueInput.get(editList).element); | + | GUIComponentBinding.create(findJanneRoe.opValue(), editList.ipElement()); |
- | CellLayoutData.setSize(editList, "250px", "200px"); | + | GUIComponentBinding.create(findJanneRoe.opValue(), editList.ipSlotValueElement()); |
- | editList.styleName.set(Text.fromString("listEditor")); | + | |
+ | editList.setSize("250px", "200px"); | ||
+ | editList.setStyle("listEditor"); | ||
} | } | ||
private GUIContext createContextAndStyles() { | private GUIContext createContextAndStyles() { | ||
GUIContext context = new GUIContext(); | GUIContext context = new GUIContext(); | ||
- | context.supercontext.set(DefaultContextInit.getRoot()); | + | DefaultContextInit.getRoot().addContext(context); |
GUIObjectSetting person = GUIObjectSetting.create(context, Person.CLASSIFIER); | GUIObjectSetting person = GUIObjectSetting.create(context, Person.CLASSIFIER); | ||
GUITextFeature.createName(person, Person.PROPERTIES.name); | GUITextFeature.createName(person, Person.PROPERTIES.name); | ||
- | GUITextFeature.createSeparator(person, ":", true); | + | GUITextFeature.createFixedSeparator(person, ":"); |
GUITextFeature.createDescription(person, Person.PROPERTIES.age); | GUITextFeature.createDescription(person, Person.PROPERTIES.age); | ||
GUIPictureFeature.createSmallIcon(person, "images/icons/person.png"); | GUIPictureFeature.createSmallIcon(person, "images/icons/person.png"); |