Exemplo n.º 1
0
 private void setAttributes(String parentId) {
   remoteObject.set(PROPERTY_PARENT, parentId);
   remoteObject.set(PROPERTY_TITLE, descriptor.getTitle());
   setImage();
   setDefaultEnabled();
   setDefaultVisible();
 }
Exemplo n.º 2
0
 private void setAttributes() {
   remoteObject.set(PROPERTY_PARENT, uiRenderer.getRemoteUIId());
   remoteObject.set(PROPERTY_TOP_LEVEL, descriptor.isTopLevel());
   if (descriptor.getPageStyle() != null && descriptor.getPageStyle().length > 0) {
     remoteObject.set(PROPERTY_STYLE, createPageStyleParameter(descriptor.getPageStyle()));
   }
   setImage();
 }
Exemplo n.º 3
0
 @Override
 public void createControl(Composite parent) {
   if (control == null) {
     Composite container = new Composite(parent, SWT.NONE);
     container.setLayout(new FillLayout());
     page.createContent(container, ui);
     control = container;
     remoteObject.set(PROPERTY_CONTROL, WidgetUtil.getId(control));
   }
 }
Exemplo n.º 4
0
 private void setImage() {
   Image image = createImage(descriptor.getImage());
   if (image != null) {
     Rectangle bounds = image.getBounds();
     JsonArray imageData = new JsonArray();
     imageData.add(ImageFactory.getImagePath(image));
     imageData.add(bounds.width);
     imageData.add(bounds.height);
     remoteObject.set(PROPERTY_IMAGE, imageData);
   }
 }
Exemplo n.º 5
0
 private void setImage() {
   Image image = createImage(descriptor.getImage());
   if (image != null) {
     Rectangle bounds = image.getBounds();
     Object[] imageData =
         new Object[] {
           ImageFactory.getImagePath(image),
           Integer.valueOf(bounds.width),
           Integer.valueOf(bounds.height)
         };
     remoteObject.set(PROPERTY_IMAGE, imageData);
   }
 }
Exemplo n.º 6
0
 @Override
 public void renderInitialization(CTabFolder folder) throws IOException {
   RemoteObject remoteObject = createRemoteObject(folder, TYPE);
   remoteObject.setHandler(new CTabFolderOperationHandler(folder));
   remoteObject.set("parent", WidgetUtil.getId(folder.getParent()));
   remoteObject.set("style", createJsonArray(getStyles(folder, ALLOWED_STYLES)));
   JsonArray toolTipTexts =
       new JsonArray()
           .add(SWT.getMessage("SWT_Minimize"))
           .add(SWT.getMessage("SWT_Maximize"))
           .add(SWT.getMessage("SWT_Restore"))
           .add(SWT.getMessage("SWT_ShowList"))
           .add(SWT.getMessage("SWT_Close"));
   remoteObject.set(PROP_TOOLTIP_TEXTS, toolTipTexts);
   // Always listen for Selection and Folder.
   // Currently required for item's control visibility and bounds update.
   remoteObject.listen(PROP_SELECTION_LISTENER, true);
   // Currently required for always sending close/showList notify operations.
   remoteObject.listen(PROP_FOLDER_LISTENER, true);
 }
Exemplo n.º 7
0
 @Override
 public void renderInitialization(ExpandItem item) throws IOException {
   RemoteObject remoteObject = createRemoteObject(item, TYPE);
   remoteObject.setHandler(new ExpandItemOperationHandler(item));
   remoteObject.set("parent", getId(item.getParent()));
 }
Exemplo n.º 8
0
 public void setVisible(boolean visible) {
   remoteObject.set(PROPERTY_VISIBILITY, visible);
 }
Exemplo n.º 9
0
 public void setEnabled(boolean enabled) {
   remoteObject.set(PROPERTY_ENABLED, enabled);
 }
Exemplo n.º 10
0
 public void destroy() {
   remoteObject.destroy();
 }
 private static List<ClientMessage.Operation> getOperations(RemoteObject remoteObject) {
   return getClientMessage().getAllOperationsFor(remoteObject.getId());
 }
Exemplo n.º 12
0
 String getId() {
   return remoteObject.getId();
 }
Exemplo n.º 13
0
 @Override
 public void destroy() {
   page.destroy();
   control.dispose();
   remoteObject.destroy();
 }
Exemplo n.º 14
0
 @Override
 public void setTitle(String title) {
   remoteObject.set(PROPERTY_TITLE, title);
 }
Exemplo n.º 15
0
 public TableItemHeightService() {
   remoteObject =
       ((ConnectionImpl) RWT.getUISession().getConnection())
           .createServiceObject(GRID_ITEM_HEIGHT_SETTER);
   remoteObject.setHandler(this);
 }