Java Code Examples for com.smartgwt.client.widgets.layout.HLayout#addMember()

The following examples show how to use com.smartgwt.client.widgets.layout.HLayout#addMember() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StationSelector.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private Canvas createInfoWindow() {
	VLayout layout = new VLayout();
	layout.addMember(createInformationFieldForSelectedStation());
	HLayout buttons = new HLayout();
	buttons.setAutoHeight();
	buttons.setAlign(Alignment.RIGHT);
       buttons.addMember(createApplyCancelCanvas());
       layout.addMember(buttons);

	infoWindow = new InteractionWindow(layout);
	infoWindow.setZIndex(1000000);
	infoWindow.setWidth(300);
	infoWindow.setHeight(300);
	setInfoWindowPosition();
	infoWindow.hide();
	return infoWindow;
}
 
Example 2
Source File: LegendEntryTimeSeries.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private Canvas createLegendTools() {
	HLayout tools = new HLayout();

	createColorChangeButton();
	tools.addMember(this.titleCol);

	if (ClientUtils.isSesEnabled()) {
		createSesCommunicatorButton();
		tools.addMember(this.sesComButton);
           if (isEventingEnabledFor(getTimeSeries().getProperties().getServiceUrl())) {
               createSesCommunicatorButton();
               tools.addMember(this.sesComButton);
           }
	}

	createInformationButton();
	tools.addMember(this.infoButton);

	createDeleteLegendEntryButton();
	tools.addMember(this.deleteButton);

	return tools;
}
 
Example 3
Source File: DigitalObjectEditor.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
public DigitalObjectEditor(ClientMessages i18n, PlaceController places, boolean embedded) {
    this.i18n = i18n;
    this.places = places;
    this.editorCache = new EnumMap<DatastreamEditorType, EditorDescriptor>(DatastreamEditorType.class);
    this.widget = new VLayout();
    this.lblHeader = new Label();
    lblHeader.setAutoHeight();
    lblHeader.setPadding(4);
    lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE);
    this.actionSource = new ActionSource(this);
    this.embeddedView = embedded;
    this.toolbar = Actions.createToolStrip();
    this.editorContainer = new VLayout();
    editorContainer.setLayoutMargin(4);
    editorContainer.setWidth100();
    editorContainer.setHeight100();

    widget.addMember(lblHeader);
    widget.addMember(toolbar);

    if (embedded) {
        widget.addMember(editorContainer);
    } else {
        editorContainer.setResizeBarTarget("next");
        HLayout multiView = new HLayout();
        multiView.setWidth100();
        multiView.setHeight100();
        multiView.setLayoutMargin(4);
        multiView.addMember(editorContainer);
        initOptionalEditor(multiView);
        widget.addMember(multiView);
    }
}
 
Example 4
Source File: WorkflowJobView.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private Canvas createJobLayout() {
    VLayout left = new VLayout();
    left.addMember(createJobsToolbar());
    left.addMember(createJobList());
    left.addMember(createSubjobList());
    left.setShowResizeBar(true);

    CanvasSizePersistence sizePersistence = new CanvasSizePersistence("WorkflowJobFormView.jobLayout", left);
    left.setWidth(sizePersistence.getWidth());

    HLayout l = new HLayout();
    l.addMember(left);
    l.addMember(createJobFormLayout());
    return l;
}
 
Example 5
Source File: WorkflowTasksView.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private Canvas createTaskLayout() {
    VLayout left = new VLayout();
    left.addMember(createToolbar());
    left.addMember(createTaskList());
    HLayout l = new HLayout();
    l.addMember(left);
    l.addMember(createTaskFormLayout());
    return l;
}
 
Example 6
Source File: RepeatableForm.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private Canvas createRowWidget(Row row) {
    HLayout hLayout = new HLayout();
    Canvas buttons = createItemButtons(row);
    buttons.setLayoutAlign(VerticalAlignment.BOTTOM);
    hLayout.addMember(row.getFormWidget().getWidget());
    hLayout.addMember(buttons);
    return hLayout;
}
 
Example 7
Source File: ProfileWindow.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void loadWindowContent() {
    if (userDataLayout != null) {
        userDataLayout.clearValues();
    }
    content = new HLayout();
    content.addMember(createEditProfileLayout());
    content.addMember(createSubcriptionsLayout());
    content.setStyleName("n52_sensorweb_client_form_content");
    addItem(content);
    setTitle(i18n.editUserData());
    markForRedraw();
}
 
Example 8
Source File: EventSubscriptionWindow.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void loadWindowContent() {
    content = new HLayout();
    content.setStyleName("n52_sensorweb_client_create_abo_window_content");
    content.addMember(createSubscribeAndHelpContent());
    setTitle(i18n.createAboWindowTitle());
    addItem(content);
    markForRedraw();
}
 
Example 9
Source File: CreateComplexRuleLayout.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private HLayout createSingle(String ruleName){
    this.singleCount++;
    
    DynamicForm block1 = new DynamicForm();
    block1.setWidth("50%");
    block1.setNumCols(1);
    
    DynamicForm block2 = new DynamicForm();
    block2.setWidth("50%");
    block2.setNumCols(1);
    
    SelectItem rule1Item = new SelectItem();
    rule1Item.setShowTitle(false);
    rule1Item.setValueMap(this.rulesHashMap);
    rule1Item.setWidth(this.selectItemWidth);
    if (ruleName != null) {
        rule1Item.setValue(ruleName);
    }
    
    SpacerItem spacerItem = new SpacerItem();
    spacerItem.setShowTitle(false);
    spacerItem.setHeight(20);
    
    block2.setFields(rule1Item);

    HLayout layout = new HLayout();
    layout.setWidth(200);
    layout.setHeight(25);
    layout.addMember(block1);
    layout.addMember(block2);

    // save tree
    this.tempTree = this.rootTree;
    Tree right = new Tree(rule1Item, null, null);

    this.rootTree = new Tree(this.singleOperator, this.tempTree, right);

    return layout;
}
 
Example 10
Source File: View.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private Layout getDataViewAndLegendPanel() {
    HLayout hLayout = new HLayout();
    hLayout.setOverflow(Overflow.HIDDEN);
    hLayout.addMember(getLegend());
    hLayout.addMember(getLegendHider());
    hLayout.addMember(getDataPanel());
    hLayout.setTabIndex( -1);
    return hLayout;
}
 
Example 11
Source File: SignatureDialog.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
public SignatureDialog(long[] docIds) {
	super();

	this.docIds = docIds;

	setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON);
	setTitle(I18N.message("signature"));
	setCanDragResize(true);
	setIsModal(true);
	setShowModalMask(true);
	setAutoSize(true);
	centerInPage();

	VLayout layout = new VLayout();
	layout.setWidth100();
	layout.setHeight(40);

	form.setValuesManager(vm);
	form.setWrapItemTitles(false);
	form.setTitleOrientation(TitleOrientation.TOP);
	form.setNumCols(2);

	TextItem reason = ItemFactory.newTextItem("reason", "reason", null);
	reason.setRequired(true);
	reason.setWrapTitle(false);
	reason.setWidth(250);
	reason.setAutoComplete(AutoComplete.NONE);

	visualPositioning = new CheckboxItem();
	visualPositioning.setName("visualpositioning");
	visualPositioning.setTitle(I18N.message("visualpositioning"));
	visualPositioning.setDisabled(true);

	form.setItems(reason, visualPositioning);

	IButton sign = new IButton(I18N.message("sign"));
	sign.setAutoFit(true);
	sign.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			onSign();
		}
	});

	HLayout buttons = new HLayout();
	buttons.setMembersMargin(5);
	buttons.setMargin(3);
	buttons.addMember(sign);

	layout.addMember(form);
	layout.addMember(buttons);

	addItem(layout);

	SignService.Instance.get().isVisualSignatureEnabled(new AsyncCallback<Boolean>() {

		@Override
		public void onFailure(Throwable caught) {
			Log.serverError(caught);
		}

		@Override
		public void onSuccess(Boolean enabled) {
			visualPositioning.setDisabled(!enabled);
		}
	});
}
 
Example 12
Source File: ImportBatchItemEditor.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
public ImportBatchItemEditor(ClientMessages i18n) {
        this.i18n = i18n;
        this.setHeight100();
        this.setWidth100();
        this.actionSource = new ActionSource(this);
        
        VLayout layout = new VLayout();
        layout.setShowResizeBar(true);
        layout.setResizeBarTarget("next");

        batchItemGrid = createItemList();
        layout.addMember(batchItemGrid);

        // child editors
        SimpleEventBus eventBus = new SimpleEventBus();
        childPlaces = new PlaceController(eventBus);
        childEditor = new DigitalObjectEditor(i18n, childPlaces, true);
        childDisplay = initDigitalObjectEditor(childEditor, eventBus);
        layout.addMember(childDisplay);

        HLayout editorThumbLayout = new HLayout();
        editorThumbLayout.setHeight100();
        editorThumbLayout.addMember(layout);

        thumbViewer = createThumbViewer();
        editorThumbLayout.addMember(thumbViewer);

        this.selectionCache = new SelectionCache<>(
                Optional.empty(),
                r -> batchItemGrid.getRecordIndex(r));

        VLayout editorThumbToolbarLayout = new VLayout();
        editorThumbToolbarLayout.setShowResizeBar(true);
        editorThumbToolbarLayout.setResizeBarTarget("next");

        createActions();
        ToolStrip editorToolStrip = createEditorToolBar(actionSource);
        editorThumbToolbarLayout.addMember(editorToolStrip);
        editorThumbToolbarLayout.addMember(editorThumbLayout);

        addMember(editorThumbToolbarLayout);

        digitalObjectPreview = new MediaEditor(i18n, MediaEditor.SOURCE_IMPORT_BATCH_ITEM_EDITOR);
        digitalObjectPreview.addBackgroundColorListeners(thumbViewer);
        digitalObjectPreview.setShowRefreshButton(true);
        ToolStrip previewToolbar = Actions.createToolStrip();
        previewToolbar.setMembers(digitalObjectPreview.getToolbarItems());
        VLayout previewLayout = new VLayout();
        previewLayout.setMembers(previewToolbar, digitalObjectPreview.getUI());
        previewLayout.setWidth("40%");
        previewLayout.setHeight100();
//        previewLayout.setShowResizeBar(true);
//        previewLayout.setResizeFrom("L");
        addMember(previewLayout);
        createEditorContextMenu(batchItemGrid.getContextMenu(), this);
        createEditorContextMenu(thumbViewer.getContextMenu(), this);
    }
 
Example 13
Source File: CreateComplexRuleLayout.java    From SensorWebClient with GNU General Public License v2.0 4 votes vote down vote up
private void addSingle(String op, String ruleName){
    // get all members from mainLayout and clear the layout
    Canvas[] members = this.ruleBlockLayout.getMembers();
    this.ruleBlockLayout.removeMembers(this.ruleBlockLayout.getMembers());
    
    LinkedHashMap<String, String> operatorHashMap = getLogicalOperators();

    VLayout v2 = new VLayout();
    v2.setWidth("70%");
    v2.addMember(members[0]);
    v2.addMember(createSingle(ruleName));
    
    DynamicForm block1 = new DynamicForm();
    block1.setWidth("30%");
    block1.setNumCols(1);
    
    this.singleOperator = new SelectItem();
    this.singleOperator.setShowTitle(false);
    this.singleOperator.setWidth(this.operatorWidth);
    this.singleOperator.setValueMap(operatorHashMap);
    this.singleOperator.setTextAlign(Alignment.CENTER);
    if (op != null) {
        this.singleOperator.setValue(op);
    } else {
        this.singleOperator.setValue(LogicalOperator.AND.toString());
    }
    
    SpacerItem spacerItem = new SpacerItem();
    spacerItem.setShowTitle(false);
    spacerItem.setHeight(20);
    
    block1.setFields(spacerItem, spacerItem, this.singleOperator);

    HLayout layout = new HLayout();
    layout.setWidth(200);
    layout.setHeight(25);
    layout.setEdgeMarginSize(1);
    layout.setEdgeSize(2);
    layout.setShowEdges(true);
    layout.addMember(block1);
    layout.addMember(v2);

    this.ruleBlockLayout.addMember(layout);
}