private void setAttributes(String parentId) { remoteObject.set(PROPERTY_PARENT, parentId); remoteObject.set(PROPERTY_TITLE, descriptor.getTitle()); setImage(); setDefaultEnabled(); setDefaultVisible(); }
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(); }
@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)); } }
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); } }
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); } }
@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); }
@Override public void renderInitialization(ExpandItem item) throws IOException { RemoteObject remoteObject = createRemoteObject(item, TYPE); remoteObject.setHandler(new ExpandItemOperationHandler(item)); remoteObject.set("parent", getId(item.getParent())); }
public void setVisible(boolean visible) { remoteObject.set(PROPERTY_VISIBILITY, visible); }
public void setEnabled(boolean enabled) { remoteObject.set(PROPERTY_ENABLED, enabled); }
public void destroy() { remoteObject.destroy(); }
private static List<ClientMessage.Operation> getOperations(RemoteObject remoteObject) { return getClientMessage().getAllOperationsFor(remoteObject.getId()); }
String getId() { return remoteObject.getId(); }
@Override public void destroy() { page.destroy(); control.dispose(); remoteObject.destroy(); }
@Override public void setTitle(String title) { remoteObject.set(PROPERTY_TITLE, title); }
public TableItemHeightService() { remoteObject = ((ConnectionImpl) RWT.getUISession().getConnection()) .createServiceObject(GRID_ITEM_HEIGHT_SETTER); remoteObject.setHandler(this); }