Differences

This shows you the differences between two versions of the page.

Link to this comparison view

file_system [2012/04/02 17:10]
srdjan.lukovic [File System Sample]
file_system [2012/07/09 10:59] (current)
srdjan.lukovic [GUI Code]
Line 1: Line 1:
-====== File System Sample ====== +====== File System ====== 
-This is the most complex sample presented in this wiki. It is web based [[wp>Orthodox_file_manager#Orthodox_file_managers | Orthodox File Manager]] applicationFile system can be browsed per user (//Person//), that is, every person has different root folder. You can create new file or folder, move or copy files and folders, rename and delete them. Any of these commands (except renaming) can be performed on multiple items by selecting them from the list, or using //"select all"// checkbox. Selections are persisted, and every change in folder structure is reflected immediately on opposite panel (if they're showing the same folder). Breadcrumbs are clickable, so you could return to any of the parent folders in one click.+ 
 +**File System** is a [[SOLoist Sample Applications|SOLoist sample application]] that represents a web-based [[wp>Orthodox_file_manager#Orthodox_file_managers | Orthodox File Manager]], with a personalized directory structure and standard file operationsIt shows how a traditional concept of a file system can be implemented using the object paradigm with UML modeling and SOLoist UI. 
 + 
 +Each object of //Person// has an associated file system that starts with a root folder. When an object of //Person// is selected in the topmost suggestion box, the file system associated to that object is browsed in two parallel windows. 
 + 
 +new file or folder can be created. Files or folders can be moved or copied, renamed, and deleted. Any of these commands (except renaming) can be performed on multiple items by selecting them from the list, or using the //Select all// checkbox. Selections are persisted, and every change in the folder structure is reflected immediately in the opposite window (if it is currently showing the same folder). Breadcrumbs are clickable, so one can return to any of the parent folders in one click.
  
 ==== Live example ==== ==== Live example ====
Line 6: Line 11:
 [[http://soloistdemo.org/SampleApplications/filesystem.html]]\\ [[http://soloistdemo.org/SampleApplications/filesystem.html]]\\
 [[http://soloistdemo.org/SampleApplications/oql?q=SELECT+d%2C+d.title%2C+d.description%2C+d.isPublic%2C+d.submitted%2C+d.date%2C+d.superItem%0AFROM+Document+d&hide=0 | OQL Query: Documents]] [[http://soloistdemo.org/SampleApplications/oql?q=SELECT+d%2C+d.title%2C+d.description%2C+d.isPublic%2C+d.submitted%2C+d.date%2C+d.superItem%0AFROM+Document+d&hide=0 | OQL Query: Documents]]
 +|{{screen:filesystem.png?350}}|
 ===== UML Model ===== ===== UML Model =====
 {{filesystem.png}} {{filesystem.png}}
Line 495: Line 500:
 import rs.sol.soloist.server.guiconfiguration.construction.GUIComponent; import rs.sol.soloist.server.guiconfiguration.construction.GUIComponent;
 import rs.sol.soloist.server.guiconfiguration.construction.GUIComponentBinding; import rs.sol.soloist.server.guiconfiguration.construction.GUIComponentBinding;
-import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUICollectionInput; 
 import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUIElementComponent; import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUIElementComponent;
-import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUISuggestWidget;+import rs.sol.soloist.server.guiconfiguration.elementcomponents.GUIInput;
 import rs.sol.soloist.server.guiconfiguration.nonvisualcompoments.GUIBooleanFilter; import rs.sol.soloist.server.guiconfiguration.nonvisualcompoments.GUIBooleanFilter;
 import rs.sol.soloist.server.guiconfiguration.nonvisualcompoments.GUIBufferComponent; import rs.sol.soloist.server.guiconfiguration.nonvisualcompoments.GUIBufferComponent;
Line 527: Line 531:
  {  {
  GUIApplicationComponent page = new GUIApplicationComponent();  GUIApplicationComponent page = new GUIApplicationComponent();
- page.name.set(Text.fromString("FileSystem")); + page.setName("FileSystem"); 
  SoloistServiceServlet.registerApplication(page);  SoloistServiceServlet.registerApplication(page);
  GUIContext context = createContextAndStyles();  GUIContext context = createContextAndStyles();
- page.context.set(context);+ page.setContext(context);
   
  GUIPanelComponent root = GUIPanelComponent.createFlow(page);  GUIPanelComponent root = GUIPanelComponent.createFlow(page);
   
  GUILabelComponent title = GUILabelComponent.create(root, "File System");  GUILabelComponent title = GUILabelComponent.create(root, "File System");
- 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");
  
- GUIFindAllInstancesSAPComponent allPersons = GUIFindAllInstancesSAPComponent.create(root, Person.FQ_TYPE_NAME); + GUIFindAllInstancesSAPComponent allPersons = GUIFindAllInstancesSAPComponent.create(root, Person.CLASSIFIER); 
- GUILabelComponent.create(topPanel, "Choose person:").styleName.set(Text.fromString("margin3")); + GUILabelComponent.create(topPanel, "Choose person:").setStyle("margin3"); 
- GUIElementComponent suggestBox = GUIElementComponent.createInput(topPanel, new GUISuggestWidget(), new GUICollectionInput()); + GUIInput suggestBox = GUIInput.createSuggest(topPanel); 
- suggestBox.styleName.set(Text.fromString("margin3")); + suggestBox.setStyle("margin3"); 
- GUIComponentBinding.create(allPersons.valueGUICollectionInput.get(suggestBox).collection);+ GUIComponentBinding.create(allPersons.opValue()suggestBox.ipCollection());
   
  copy = new Copy();  copy = new Copy();
Line 556: Line 560:
   
  GUIPanelComponent fileSystemPanel = GUIPanelComponent.createFlow(topPanel);  GUIPanelComponent fileSystemPanel = GUIPanelComponent.createFlow(topPanel);
- fileSystemPanel.styleName.set(Text.fromString("fileSystemRootPanel"));+ fileSystemPanel.setStyle("fileSystemRootPanel");
   
- GUITransformerComponent gtc = GUITransformerComponent.transformToSlotValue(fileSystemPanel, Person.PROPERTIES.rootFolder); + GUITransformerComponent gtc = GUITransformerComponent.createSlotValue(fileSystemPanel, Person.PROPERTIES.rootFolder); 
- GUIComponentBinding.create(suggestBox.value, gtc.input);+ GUIComponentBinding.create(suggestBox.opValue(), gtc.ipInput());
   
  GUIBufferComponent leftBufferWithRootFolder = GUIBufferComponent.create(fileSystemPanel, false, (IElement)null); // initially empty  GUIBufferComponent leftBufferWithRootFolder = GUIBufferComponent.create(fileSystemPanel, false, (IElement)null); // initially empty
  GUIBufferComponent rightBufferWithRootFolder = GUIBufferComponent.create(fileSystemPanel, false, (IElement)null); // initially empty  GUIBufferComponent rightBufferWithRootFolder = GUIBufferComponent.create(fileSystemPanel, false, (IElement)null); // initially empty
- GUIComponentBinding.create(gtc.output, leftBufferWithRootFolder.input); // first fill the buffer + GUIComponentBinding.create(gtc.opOutput(), leftBufferWithRootFolder.ipInput()); // first fill the buffer 
- GUIComponentBinding.create(gtc.output, rightBufferWithRootFolder.input); // first fill the buffer + GUIComponentBinding.create(gtc.opOutput(), rightBufferWithRootFolder.ipInput()); // first fill the buffer 
- GUIComponentBinding.create(gtc.output, leftBufferWithRootFolder.send); // then tell it to send + GUIComponentBinding.create(gtc.opOutput(), leftBufferWithRootFolder.ipSend()); // then tell it to send 
- GUIComponentBinding.create(gtc.output, rightBufferWithRootFolder.send); // then tell it to send+ GUIComponentBinding.create(gtc.opOutput(), rightBufferWithRootFolder.ipSend()); // then tell it to send
   
  GUIPanelComponent left = GUIPanelComponent.createFlow(fileSystemPanel);  GUIPanelComponent left = GUIPanelComponent.createFlow(fileSystemPanel);
- left.styleName.set(Text.fromString("floatL"));+ left.setStyle("floatL");
  GUIPanelComponent buttonColumn = GUIPanelComponent.createFlow(fileSystemPanel);  GUIPanelComponent buttonColumn = GUIPanelComponent.createFlow(fileSystemPanel);
- buttonColumn.styleName.set(Text.fromString("buttonColumn"));+ buttonColumn.setStyle("buttonColumn");
  GUIPanelComponent right = GUIPanelComponent.createFlow(fileSystemPanel);  GUIPanelComponent right = GUIPanelComponent.createFlow(fileSystemPanel);
- right.styleName.set(Text.fromString("floatR"));+ right.setStyle("floatR");
   
  GUIBreadCrumbsSample leftBread = new GUIBreadCrumbsSample();  GUIBreadCrumbsSample leftBread = new GUIBreadCrumbsSample();
- leftBread.parent.set(left);+ left.add(leftBread);
  GUIFileSystemSample leftBrowser = new GUIFileSystemSample();  GUIFileSystemSample leftBrowser = new GUIFileSystemSample();
  leftBrowser.isLeft.set(Boolean.TRUE);  leftBrowser.isLeft.set(Boolean.TRUE);
- fileBrowserHeadingFragment(left, leftBread.input); + fileBrowserHeadingFragment(left, leftBread.opRelay1()); 
- leftBrowser.parent.set(left); + left.add(leftBrowser); 
- GUIComponentBinding.create(leftBufferWithRootFolder.output, leftBread.element); + GUIComponentBinding.create(leftBufferWithRootFolder.opOutput(), leftBread.ipElement()); 
- GUIComponentBinding.create(leftBufferWithRootFolder.output, leftBrowser.element); + GUIComponentBinding.create(leftBufferWithRootFolder.opOutput(), leftBrowser.ipElement()); 
- GUIComponentBinding.create(leftBread.output, leftBrowser.element); + GUIComponentBinding.create(leftBread.opRelay2(), leftBrowser.ipElement()); 
- GUIComponentBinding.create(leftBrowser.output, leftBread.element); + GUIComponentBinding.create(leftBrowser.opRelay2(), leftBread.ipElement()); 
- GUIComponentBinding.create(left.output, leftBrowser.refreshContents);+ GUIComponentBinding.create(left.opRelay2(), leftBrowser.ipRefreshContents());
   
  GUIBreadCrumbsSample rightBread = new GUIBreadCrumbsSample();  GUIBreadCrumbsSample rightBread = new GUIBreadCrumbsSample();
- rightBread.parent.set(right);+ right.add(rightBread);
  GUIFileSystemSample rightBrowser = new GUIFileSystemSample();  GUIFileSystemSample rightBrowser = new GUIFileSystemSample();
  rightBrowser.isLeft.set(Boolean.FALSE);  rightBrowser.isLeft.set(Boolean.FALSE);
- fileBrowserHeadingFragment(right, rightBread.input); + fileBrowserHeadingFragment(right, rightBread.opRelay1()); 
- rightBrowser.parent.set(right); + right.add(rightBrowser); 
- GUIComponentBinding.create(rightBufferWithRootFolder.output, rightBread.element); + GUIComponentBinding.create(rightBufferWithRootFolder.opOutput(), rightBread.ipElement()); 
- GUIComponentBinding.create(rightBufferWithRootFolder.output, rightBrowser.element); + GUIComponentBinding.create(rightBufferWithRootFolder.opOutput(), rightBrowser.ipElement()); 
- GUIComponentBinding.create(rightBread.output, rightBrowser.element); + GUIComponentBinding.create(rightBread.opRelay2(), rightBrowser.ipElement()); 
- GUIComponentBinding.create(rightBrowser.output, rightBread.element); + GUIComponentBinding.create(rightBrowser.opRelay2(), rightBread.ipElement()); 
- GUIComponentBinding.create(right.output, rightBrowser.refreshContents); + GUIComponentBinding.create(right.opRelay2(), rightBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(right.output, leftBrowser.refreshContents); + GUIComponentBinding.create(right.opRelay2(), leftBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(left.output, rightBrowser.refreshContents);+ GUIComponentBinding.create(left.opRelay2(), rightBrowser.ipRefreshContents());
   
  // connecting browsers  // connecting browsers
- GUIComponentBinding.create(leftBrowser.output, leftBrowser.element); + GUIComponentBinding.create(leftBrowser.opRelay2(), leftBrowser.ipElement()); 
- GUIComponentBinding.create(rightBrowser.output, rightBrowser.element);+ GUIComponentBinding.create(rightBrowser.opRelay2(), rightBrowser.ipElement());
   
- GUIComponentBinding.create(leftBread.output, leftBread.element); + GUIComponentBinding.create(leftBread.opRelay2(), leftBread.ipElement()); 
- GUIComponentBinding.create(rightBread.output, rightBread.element);+ GUIComponentBinding.create(rightBread.opRelay2(), rightBread.ipElement());
  // end connecting browsers  // end connecting browsers
   
  GUIButtonComponent copyLTR = GUIButtonComponent.create(buttonColumn, " ", new Copy());  GUIButtonComponent copyLTR = GUIButtonComponent.create(buttonColumn, " ", new Copy());
- copyLTR.tooltip.set(Text.fromString("Copy left to right")); + copyLTR.setTooltip("Copy left to right"); 
- copyLTR.styleName.set(Text.fromString("copyLTR")); + copyLTR.setStyle("copyLTR"); 
- GUIComponentBinding.create(leftBread.input, copyLTR, Copy.PROPERTIES.from); + GUIComponentBinding.create(leftBread.opRelay1(), copyLTR, Copy.PROPERTIES.from); 
- GUIComponentBinding.create(rightBread.input, copyLTR, Copy.PROPERTIES.to);+ GUIComponentBinding.create(rightBread.opRelay1(), copyLTR, Copy.PROPERTIES.to);
  
  GUIButtonComponent moveLTR = GUIButtonComponent.create(buttonColumn, " ", new Move());  GUIButtonComponent moveLTR = GUIButtonComponent.create(buttonColumn, " ", new Move());
- moveLTR.tooltip.set(Text.fromString("Move left to right")); + moveLTR.setTooltip("Move left to right"); 
- moveLTR.styleName.set(Text.fromString("moveLTR")); + moveLTR.setStyle("moveLTR"); 
- GUIComponentBinding.create(leftBread.input, moveLTR, Move.PROPERTIES.from); + GUIComponentBinding.create(leftBread.opRelay1(), moveLTR, Move.PROPERTIES.from); 
- GUIComponentBinding.create(rightBread.input, moveLTR, Move.PROPERTIES.to);+ GUIComponentBinding.create(rightBread.opRelay1(), moveLTR, Move.PROPERTIES.to);
   
  GUIButtonComponent copyRTL = GUIButtonComponent.create(buttonColumn, " ", new Copy());  GUIButtonComponent copyRTL = GUIButtonComponent.create(buttonColumn, " ", new Copy());
- copyRTL.tooltip.set(Text.fromString("Copy right to left")); + copyRTL.setTooltip("Copy right to left"); 
- copyRTL.styleName.set(Text.fromString("copyRTL")); + copyRTL.setStyle("copyRTL"); 
- GUIComponentBinding.create(rightBread.input, copyRTL, Copy.PROPERTIES.from); + GUIComponentBinding.create(rightBread.opRelay1(), copyRTL, Copy.PROPERTIES.from); 
- GUIComponentBinding.create(leftBread.input, copyRTL, Copy.PROPERTIES.to);+ GUIComponentBinding.create(leftBread.opRelay1(), copyRTL, Copy.PROPERTIES.to);
   
  GUIButtonComponent moveRTL = GUIButtonComponent.create(buttonColumn, " ", new Move());  GUIButtonComponent moveRTL = GUIButtonComponent.create(buttonColumn, " ", new Move());
- moveRTL.tooltip.set(Text.fromString("Move right to left")); + moveRTL.setTooltip("Move right to left"); 
- moveRTL.styleName.set(Text.fromString("moveRTL")); + moveRTL.setStyle("moveRTL"); 
- GUIComponentBinding.create(rightBread.input, moveRTL, Move.PROPERTIES.from); + GUIComponentBinding.create(rightBread.opRelay1(), moveRTL, Move.PROPERTIES.from); 
- GUIComponentBinding.create(leftBread.input, moveRTL, Move.PROPERTIES.to);+ GUIComponentBinding.create(leftBread.opRelay1(), moveRTL, Move.PROPERTIES.to);
   
- GUIComponentBinding.create(copyLTR.commandExecuted, leftBrowser.refreshContents); + GUIComponentBinding.create(copyLTR.opCommandExecuted(), leftBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(copyLTR.commandExecuted, rightBrowser.refreshContents); + GUIComponentBinding.create(copyLTR.opCommandExecuted(), rightBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(moveLTR.commandExecuted, leftBrowser.refreshContents); + GUIComponentBinding.create(moveLTR.opCommandExecuted(), leftBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(moveLTR.commandExecuted, rightBrowser.refreshContents); + GUIComponentBinding.create(moveLTR.opCommandExecuted(), rightBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(copyRTL.commandExecuted, leftBrowser.refreshContents); + GUIComponentBinding.create(copyRTL.opCommandExecuted(), leftBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(copyRTL.commandExecuted, rightBrowser.refreshContents); + GUIComponentBinding.create(copyRTL.opCommandExecuted(), rightBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(moveRTL.commandExecuted, leftBrowser.refreshContents); + GUIComponentBinding.create(moveRTL.opCommandExecuted(), leftBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(moveRTL.commandExecuted, rightBrowser.refreshContents);+ GUIComponentBinding.create(moveRTL.opCommandExecuted(), rightBrowser.ipRefreshContents());
   
- GUINullFilter leftNullFilter = GUINullFilter.create(fileSystemPanelleftBread.input); + GUINullFilter leftNullFilter = GUINullFilter.create(fileSystemPanel); 
- GUINullFilter rightNullFilter = GUINullFilter.create(fileSystemPanelrightBread.input); + GUIComponentBinding.create(leftBread.opRelay1(), leftNullFilter.ipInput()); 
- GUIComponentBinding.create(leftNullFilter.yes, leftBufferWithRootFolder.send); + GUINullFilter rightNullFilter = GUINullFilter.create(fileSystemPanel); 
- GUIComponentBinding.create(rightNullFilter.yes, rightBufferWithRootFolder.send);+ GUIComponentBinding.create(rightBread.opRelay1(), rightNullFilter.ipInput()); 
 + GUIComponentBinding.create(leftNullFilter.opYes(), leftBufferWithRootFolder.ipSend()); 
 + GUIComponentBinding.create(rightNullFilter.opYes(), rightBufferWithRootFolder.ipSend());
   
- GUIComponentBinding.create(leftBrowser.input, leftBrowser.refreshContents); + GUIComponentBinding.create(leftBrowser.opRelay1(), leftBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(leftBrowser.input, rightBrowser.refreshContents);+ GUIComponentBinding.create(leftBrowser.opRelay1(), rightBrowser.ipRefreshContents());
   
- GUIComponentBinding.create(rightBrowser.input, rightBrowser.refreshContents); + GUIComponentBinding.create(rightBrowser.opRelay1(), rightBrowser.ipRefreshContents()); 
- GUIComponentBinding.create(rightBrowser.input, leftBrowser.refreshContents);+ GUIComponentBinding.create(rightBrowser.opRelay1(), leftBrowser.ipRefreshContents());
  }  }
  
- private void fileBrowserHeadingFragment(GUIPanelComponent rootPanel, ISlot<Text> folder)+ private void fileBrowserHeadingFragment(GUIPanelComponent rootPanel, ISlot<?> folder)
  {  {
  //heading  //heading
     GUIPanelComponent heading = GUIPanelComponent.createFlow(rootPanel);     GUIPanelComponent heading = GUIPanelComponent.createFlow(rootPanel);
-    heading.styleName.set(Text.fromString("fileBrowserHeading"));+    heading.setStyle("fileBrowserHeading");
         
-    GUIElementComponent selectionCheckbox = GUIElementComponent.createInputCheckbox(heading, ";", "", false); +    GUIInput selectionCheckbox = GUIInput.createField(heading, Boolean.CLASSIFIER); 
-    selectionCheckbox.tooltip.set(Text.fromString("Select/Deselect All"));+    selectionCheckbox.addInitialValue(Boolean.FALSE); 
 +    selectionCheckbox.setLowerBound(1); 
 +    selectionCheckbox.setTooltip("Select/Deselect All");
         
     GUICommandComponent selectCmd = GUICommandComponent.create(heading, FileSystem.selectAll, PerformImmediately.NOTHING);     GUICommandComponent selectCmd = GUICommandComponent.create(heading, FileSystem.selectAll, PerformImmediately.NOTHING);
Line 670: Line 678:
     GUIBooleanFilter gbf = GUIBooleanFilter.create(heading);     GUIBooleanFilter gbf = GUIBooleanFilter.create(heading);
         
-    FileSystem.missFirstValueLogic(heading, selectionCheckbox, gbf, gbf.input);+    FileSystem.missFirstValueLogic(heading, selectionCheckbox, gbf, gbf.ipInput());
         
-    GUIComponentBinding.create(gbf.yes, selectCmd.click); +    GUIComponentBinding.create(gbf.opYes(), selectCmd.ipClick()); 
-    GUIComponentBinding.create(gbf.no, clearSelectionCmd.click);+    GUIComponentBinding.create(gbf.opNo(), clearSelectionCmd.ipClick());
         
     GUIButtonComponent delete = GUIButtonComponent.create(heading, " ", FileSystem.deleteSelectedItems);     GUIButtonComponent delete = GUIButtonComponent.create(heading, " ", FileSystem.deleteSelectedItems);
-    delete.tooltip.set(Text.fromString("Delete")); +    delete.setTooltip("Delete"); 
-    delete.styleName.set(Text.fromString("delBtn")); +    delete.setStyle("delBtn"); 
-    delete.confirmationRequired.set(Boolean.TRUE); +    delete.setConfirmationRequired(true); 
-    delete.confirmationMessage.set(Text.fromString("Delete?"));+    delete.setConfirmationMessage("Delete?");
     GUIComponentBinding.create(folder, delete, DeleteSelectedItems.PROPERTIES.from);     GUIComponentBinding.create(folder, delete, DeleteSelectedItems.PROPERTIES.from);
         
     GUIButtonComponent newDocument = GUIButtonComponent.create(heading, " ", FileSystem.createRegularDocument);     GUIButtonComponent newDocument = GUIButtonComponent.create(heading, " ", FileSystem.createRegularDocument);
-    newDocument.tooltip.set(Text.fromString("Create new file")); +    newDocument.setTooltip("Create new file"); 
-    newDocument.styleName.set(Text.fromString("multiUploadAddMoreBtn"));+    newDocument.setStyle("multiUploadAddMoreBtn");
     GUIComponentBinding.create(folder, newDocument, CreateRegularDocument.PROPERTIES.in);     GUIComponentBinding.create(folder, newDocument, CreateRegularDocument.PROPERTIES.in);
     GUIButtonComponent newFolder = GUIButtonComponent.create(heading, " ", FileSystem.createFolder);     GUIButtonComponent newFolder = GUIButtonComponent.create(heading, " ", FileSystem.createFolder);
-    newFolder.tooltip.set(Text.fromString("Create new folder")); +    newFolder.setTooltip("Create new folder"); 
-    newFolder.styleName.set(Text.fromString("addFolder"));+    newFolder.setStyle("addFolder");
     GUIComponentBinding.create(folder, newFolder, CreateFolder.PROPERTIES.in);     GUIComponentBinding.create(folder, newFolder, CreateFolder.PROPERTIES.in);
-    GUIElementComponent newName = GUIElementComponent.createInput(heading, "", Text.CLASSIFIER); +    GUIInput newName = GUIInput.createField(heading, Text.CLASSIFIER); 
-    newName.tooltip.set(Text.fromString("Name")); +    newName.setTooltip("Name"); 
-    GUIComponentBinding.create(newName.value, newDocument, CreateRegularDocument.PROPERTIES.title); +    GUIComponentBinding.create(newName.opValue(), newDocument, CreateRegularDocument.PROPERTIES.title); 
-    GUIComponentBinding.create(newName.value, newFolder, CreateFolder.PROPERTIES.title);+    GUIComponentBinding.create(newName.opValue(), newFolder, CreateFolder.PROPERTIES.title);
         
-    GUIComponentBinding.create(delete.commandExecuted, rootPanel.output); +    GUIComponentBinding.create(delete.opCommandExecuted(), rootPanel.ipRelay2()); 
-    GUIComponentBinding.create(newFolder.commandExecuted, rootPanel.output); +    GUIComponentBinding.create(newFolder.opCommandExecuted(), rootPanel.ipRelay2()); 
-    GUIComponentBinding.create(newDocument.commandExecuted, rootPanel.output);+    GUIComponentBinding.create(newDocument.opCommandExecuted(), rootPanel.ipRelay2());
  }  }
   
Line 703: Line 711:
  {  {
  GUIContext context = new GUIContext();  GUIContext context = new GUIContext();
- context.supercontext.set(DefaultContextInit.getRoot());+ DefaultContextInit.getRoot().addContext(context);
   
  GUIObjectSetting folder = GUIObjectSetting.create(context, Folder.CLASSIFIER);  GUIObjectSetting folder = GUIObjectSetting.create(context, Folder.CLASSIFIER);
- GUITextFeature.createName(folder, "", true);+ GUITextFeature.createFixedName(folder, "");
   
  GUIObjectSetting regularDocument = GUIObjectSetting.create(context, RegularDocument.CLASSIFIER);  GUIObjectSetting regularDocument = GUIObjectSetting.create(context, RegularDocument.CLASSIFIER);
- GUITextFeature.createName(regularDocument, "", true);+ GUITextFeature.createFixedName(regularDocument, "");
   
  return context;  return context;
  }  }
   
- public static void missFirstValueLogic(GUIContainerComponent panelForNonVisuals, GUIElementComponent source, GUIComponent destComp, ISlot<Text> destSlot)+ public static void missFirstValueLogic(GUIContainerComponent panelForNonVisuals, GUIElementComponent source, GUIComponent destComp, ISlot<?> destSlot)
  {  {
- destComp.enabled.set(Boolean.FALSE);+ destComp.setEnabled(false);
   
- GUIComponentBinding.create(source.value, destSlot); // fisrt+ GUIComponentBinding.create(source.opValue(), destSlot); // fisrt
  GUIBufferComponent enableBuffer = GUIBufferComponent.create(panelForNonVisuals, false, Boolean.TRUE);  GUIBufferComponent enableBuffer = GUIBufferComponent.create(panelForNonVisuals, false, Boolean.TRUE);
- GUIComponentBinding.create(enableBuffer.output, destComp.enabled); + GUIComponentBinding.create(enableBuffer.opOutput(), destComp.ipEnabled()); 
- GUIComponentBinding.create(source.value, enableBuffer.send); // second+ GUIComponentBinding.create(source.opValue(), enableBuffer.ipSend()); // second
  }  }
 } }
Line 727: Line 735:
  
 <code java GUIFileSystemSample.java> <code java GUIFileSystemSample.java>
-@Override+    @Override
     protected GUIContainerComponent getDynamicContents(IElement el)     protected GUIContainerComponent getDynamicContents(IElement el)
     {     {
     GUIPanelComponent rootPanel = GUIPanelComponent.createFlow(null);     GUIPanelComponent rootPanel = GUIPanelComponent.createFlow(null);
-    rootPanel.styleName.set(Text.fromString("fileBrowser"));+    rootPanel.setStyle("fileBrowser");
         
     Folder folder = (Folder) el;     Folder folder = (Folder) el;
Line 754: Line 762:
     int col = 0;     int col = 0;
     GUIBufferComponent itemBuf = GUIBufferComponent.create(rootPanel, true, item);     GUIBufferComponent itemBuf = GUIBufferComponent.create(rootPanel, true, item);
-     +    GUIEdit select = GUIEdit.createList(itemsTable, Folder.PROPERTIES.selected)
-    GUIElementComponent select = GUIElementComponent.createSlotEditor(itemsTable, Folder.PROPERTIES.selected, new GUIListWidget(), new GUICollectionInput(), row, col++); +    select.setLayoutData(TableLayoutData.create(row, col++)); 
-    GUIComponentBinding.create(itemBuf.outputGUICollectionInput.get(select).collection); +    GUIComponentBinding.create(itemBuf.opOutput()select.ipCollection()); 
-    GUIComponentBinding.create(folderBuf.outputGUISlotEditorKind.get(select).element);+    GUIComponentBinding.create(folderBuf.opOutput()select.ipElement());
  
-    GUIButtonComponent edit = GUIButtonComponent.create(itemsTable, " ", row, col++); +    GUIButtonComponent edit = GUIButtonComponent.create(itemsTable, " ", TableLayoutData.create(row, col++)); 
-    edit.styleName.set(Text.fromString("editName")); +    edit.setStyle("editName"); 
-    edit.tooltip.set(Text.fromString("Rename"));+    edit.setTooltip("Rename");
  
     GUIPanelComponent nameWrap = GUIPanelComponent.createFlow(itemsTable);     GUIPanelComponent nameWrap = GUIPanelComponent.createFlow(itemsTable);
     if (item instanceof Folder)     if (item instanceof Folder)
-    TableLayoutData.setRowColumn(nameWrap, row, col++, 1, 4); //chrome likes colspan 4 +    nameWrap.setRowColumn(row, col++, 1, 4); //chrome likes colspan 4 
     else     else
-    TableLayoutData.setRowColumn(nameWrap, row, col++);+    nameWrap.setRowColumn(row, col++);
  
     GUIButtonComponent buttonLink = GUIButtonComponent.createLink(nameWrap, item.title.val().toString());     GUIButtonComponent buttonLink = GUIButtonComponent.createLink(nameWrap, item.title.val().toString());
     if (item instanceof RegularDocument)      if (item instanceof RegularDocument) 
-    buttonLink.styleName.set(Text.fromString("#fileLink"));+    buttonLink.setStyle("#fileLink");
     else     else
-    buttonLink.styleName.set(Text.fromString("#folderLink"));+    buttonLink.setStyle("#folderLink");
  
     if (item instanceof Folder) // Only for folders we will do navigation through the hierarchy and folder size.     if (item instanceof Folder) // Only for folders we will do navigation through the hierarchy and folder size.
     {     {
     GUIBufferComponent b1 = GUIBufferComponent.create(rootPanel, false, item);     GUIBufferComponent b1 = GUIBufferComponent.create(rootPanel, false, item);
-        GUIComponentBinding.create(b1.output, this.output); +        GUIComponentBinding.create(b1.opOutput(), this.ipRelay2()); 
-        GUIComponentBinding.create(buttonLink.click, b1.send);+        GUIComponentBinding.create(buttonLink.opClick(), b1.ipSend());
                 
         GUILabelComponent.create(nameWrap, FormattingUtility.formatReal(Real.valueOf(((Folder)item).getSize())) + "MB");         GUILabelComponent.create(nameWrap, FormattingUtility.formatReal(Real.valueOf(((Folder)item).getSize())) + "MB");
     }     }
         
-    GUIElementComponent nameInput = GUIElementComponent.createInput(nameWrap, "", Text.CLASSIFIER); +    GUIInput nameInput = GUIInput.createField(nameWrap, Text.CLASSIFIER); 
-    GUIInputKind.get(nameInput).initialValues.set(ElementDescriptor.create(item.title.val())); +    nameInput.addInitialValue(item.title.val()); 
-    nameInput.styleName.set(Text.fromString("gwt-TextBox-invisible"));+    nameInput.setStyle("gwt-TextBox-invisible");
     GUICommandComponent rename = GUICommandComponent.create(nameWrap, FileSystem.rename, PerformImmediately.NOTHING);     GUICommandComponent rename = GUICommandComponent.create(nameWrap, FileSystem.rename, PerformImmediately.NOTHING);
-    GUIComponentBinding.create(itemBuf.output, rename, RenameDocument.PROPERTIES.document); +    GUIComponentBinding.create(itemBuf.opOutput(), rename, RenameDocument.PROPERTIES.document); 
-    GUIComponentBinding.create(nameInput.value, rename, RenameDocument.PROPERTIES.newTitle);+    GUIComponentBinding.create(nameInput.opValue(), rename, RenameDocument.PROPERTIES.newTitle);
         
     GUIRelayComponent clickRelay = GUIRelayComponent.create(nameWrap);     GUIRelayComponent clickRelay = GUIRelayComponent.create(nameWrap);
-    FileSystem.missFirstValueLogic(nameWrap, nameInput, clickRelay, clickRelay.relay); +    FileSystem.missFirstValueLogic(nameWrap, nameInput, clickRelay, clickRelay.ipRelay()); 
-    GUIComponentBinding.create(clickRelay.relay, rename.click);+    GUIComponentBinding.create(clickRelay.opRelay(), rename.ipClick());
         
     GUIBufferComponent nullBuffer = GUIBufferComponent.create(rootPanel, false, (IElement)null);     GUIBufferComponent nullBuffer = GUIBufferComponent.create(rootPanel, false, (IElement)null);
-        GUIComponentBinding.create(nullBuffer.output, this.input); // Fires null on the input pin (which is used here for output directionto signal others. +        GUIComponentBinding.create(nullBuffer.opOutput(), this.ipRelay1()); 
-        GUIComponentBinding.create(rename.commandExecuted, nullBuffer.send);+        GUIComponentBinding.create(rename.opCommandExecuted(), nullBuffer.ipSend());
         
     GUIBufferComponent showEditor = GUIBufferComponent.create(nameWrap, false, Text.fromString("invisible"));     GUIBufferComponent showEditor = GUIBufferComponent.create(nameWrap, false, Text.fromString("invisible"));
     GUIBufferComponent showLink = GUIBufferComponent.create(nameWrap, false, Text.fromString("invisible"));     GUIBufferComponent showLink = GUIBufferComponent.create(nameWrap, false, Text.fromString("invisible"));
-    GUIComponentBinding.create(edit.click, showEditor.send); +    GUIComponentBinding.create(edit.opClick(), showEditor.ipSend()); 
-    GUIComponentBinding.create(rename.commandExecuted, showLink.send); +    GUIComponentBinding.create(rename.opCommandExecuted(), showLink.ipSend()); 
-    GUIComponentBinding.create(showEditor.output, nameInput.removeStyle); +    GUIComponentBinding.create(showEditor.opOutput(), nameInput.ipRemoveStyle()); 
-    GUIComponentBinding.create(showEditor.output, buttonLink.addStyle); +    GUIComponentBinding.create(showEditor.opOutput(), buttonLink.ipAddStyle()); 
-    GUIComponentBinding.create(showLink.output, nameInput.addStyle); +    GUIComponentBinding.create(showLink.opOutput(), nameInput.ipAddStyle()); 
-    GUIComponentBinding.create(showLink.output, buttonLink.removeStyle);+    GUIComponentBinding.create(showLink.opOutput(), buttonLink.ipRemoveStyle());
         
     if (item instanceof RegularDocument) {     if (item instanceof RegularDocument) {
-    GUIPanelComponent fileUploader = GUIFactory.createFileComponent(itemsTable, RegularDocument.PROPERTIES.file, true, true); +    GUIPanelComponent fileUploader = GUIEdit.createFile(itemsTable, RegularDocument.PROPERTIES.file, true, true); 
-    GUIComponentBinding.create(itemBuf.output, fileUploader.input); +    GUIComponentBinding.create(itemBuf.opOutput(), fileUploader.ipRelay1()); 
-    TableLayoutData.setRowColumn(fileUploader, row, col++);+    fileUploader.setRowColumn(row, col++);
         
-    GUIFactory.getBrowseButton(fileUploader).styleName.set(Text.fromString("#browse" + (isLeft.val().toBoolean() ? "L" : "R") + row)); +    GUIEdit.getBrowseButton(fileUploader).setStyle("#browse" + (isLeft.val().toBoolean() ? "L" : "R") + row); 
-    GUIHTMLComponent browse = GUIHTMLComponent.create(itemsTable, "<input type=\"button\" class=\"gwt-Button browseFolder\" onclick=\"triggerBrowse('browse" + (isLeft.val().toBoolean() ? "L" : "R") + row + "');\">"row, col++); +    GUIHTMLComponent browse = GUIHTMLComponent.create(itemsTable, "<input type=\"button\" class=\"gwt-Button browseFolder\" onclick=\"triggerBrowse('browse" + (isLeft.val().toBoolean() ? "L" : "R") + row + "');\">"); 
-    browse.tooltip.set(Text.fromString("Browse"));+    browse.setLayoutData(TableLayoutData.create(row, col++)); 
 +    browse.setTooltip("Browse");
     }     }
         
Line 826: Line 835:
  
 <code java GUIBreadCrumbsSample.java> <code java GUIBreadCrumbsSample.java>
- @Override+    @Override
     protected GUIContainerComponent getDynamicContents(IElement el)     protected GUIContainerComponent getDynamicContents(IElement el)
     {     {
     GUIPanelComponent rootPanel = GUIPanelComponent.createFlow(null);     GUIPanelComponent rootPanel = GUIPanelComponent.createFlow(null);
-    rootPanel.styleName.set(Text.fromString("filesystem_breadcrumb"));+    rootPanel.setStyle("filesystem_breadcrumb");
         
     Folder f = (Folder)el;     Folder f = (Folder)el;
Line 845: Line 854:
     {     {
     GUIBufferComponent nullBuffer = GUIBufferComponent.create(rootPanel, true, (IElement)null);     GUIBufferComponent nullBuffer = GUIBufferComponent.create(rootPanel, true, (IElement)null);
-        GUIComponentBinding.create(nullBuffer.output, this.input); // Fires NULL on the input pin (which is used here for output direction).+        GUIComponentBinding.create(nullBuffer.opOutput(), this.ipRelay1());
     return rootPanel; // If the object does not exist, we just return empty panel.     return rootPanel; // If the object does not exist, we just return empty panel.
     }     }
         
-    GUILabelComponent thisFolder = new GUILabelComponent(getFolderName(f)); +    GUILabelComponent thisFolder = GUILabelComponent.create(rootPanel, getFolderName(f)); 
-    thisFolder.styleName.set(Text.fromString("displayInline")); +    thisFolder.setStyle("displayInline");
- rootPanel.children.addFirst(thisFolder);+
         
     Folder current = f.superItem.val();     Folder current = f.superItem.val();
     while (current != null)     while (current != null)
     {     {
-    GUILabelComponent separator = new GUILabelComponent("/"); +    GUILabelComponent separator = new GUILabelComponent(); 
-    separator.styleName.set(Text.fromString("displayInline")); +    separator.setLabel("/"); 
-    rootPanel.children.addFirst(separator);+    separator.setStyle("displayInline"); 
 +    rootPanel.addFirst(separator);
         
-    GUIButtonComponent link = GUIButtonComponent.createLink(null, getFolderName(current)); +    GUIButtonComponent link = new GUIButtonComponent(); 
-    link.styleName.set(Text.fromString("displayInline")); +    link.setDisplayAsLink(true); 
-    rootPanel.children.addFirst(link);+    link.setText(getFolderName(current)); 
 +    link.setStyle("displayInline"); 
 +    rootPanel.addFirst(link);
         
     GUIBufferComponent buffer = GUIBufferComponent.create(rootPanel, false, current);     GUIBufferComponent buffer = GUIBufferComponent.create(rootPanel, false, current);
-    GUIComponentBinding.create(buffer.output, this.output); +    GUIComponentBinding.create(buffer.opOutput(), this.ipRelay2()); 
-    GUIComponentBinding.create(link.click, buffer.send);+    GUIComponentBinding.create(link.opClick(), buffer.ipSend());
         
     current = current.superItem.val();     current = current.superItem.val();
Line 872: Line 883:
         
     GUIBufferComponent currentFolderBuffer = GUIBufferComponent.create(rootPanel, true, f);     GUIBufferComponent currentFolderBuffer = GUIBufferComponent.create(rootPanel, true, f);
-    GUIComponentBinding.create(currentFolderBuffer.output, this.input); // Fires current folder on the input pin (which is used here for output direction).+    GUIComponentBinding.create(currentFolderBuffer.opOutput(), this.ipRelay1());
         
     return rootPanel;     return rootPanel;
Print/export