Java Code Examples for com.google.gwt.user.client.ui.VerticalPanel.setCellHeight()

The following are Jave code examples for showing how to use setCellHeight() of the com.google.gwt.user.client.ui.VerticalPanel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: appinventor-extensions   File: OdeLog.java   View Source Code Vote up 6 votes
/**
 * Creates a new output panel for displaying internal messages.
 */
private OdeLog() {
  // Initialize UI
  Button clearButton = new Button(MESSAGES.clearButton());
  clearButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      clear();
    }
  });

  text = new HTML();
  text.setWidth("100%");

  VerticalPanel panel = new VerticalPanel();
  panel.add(clearButton);
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
Example 2
Project: document-management-system   File: WikiManager.java   View Source Code Vote up 6 votes
/**
 * WikiManager
 */
public WikiManager(boolean isDashboard) {
	this.isDashboard = isDashboard;
	vPanel = new VerticalPanel();
	toolbar = new TabToolbarWiki(this, isDashboard);

	// Post Editor
	vWikiPanel = new VerticalPanel();
	vWikiPanel.setWidth("100%");
	wikiEditor = new WikiEditor(this);
	wikiEditor.setStyleName("okm-Mail");
	wikiHistory = new WikiHistory(this);
	wikiPage = new WikiPage();
	scrollPanelWiki = new ScrollPanel(vWikiPanel);

	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
Example 3
Project: document-management-system   File: WorkflowManager.java   View Source Code Vote up 6 votes
/**
 * WorkflowManager
 */
public WorkflowManager() {
	workflowGraph = new Image();
	scrollGraphPanel = new ScrollPanel(workflowGraph);
	toolbar = new TabToolbarWorkflow(this);
	workflowTable = new WorkflowTable(this);
	workflowDetailTable = new WorkflowDetailTable();
	vPanel = new VerticalPanel();
	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
Example 4
Project: OpenTripPlanner-client-gwt   File: LeftPanelWidget.java   View Source Code Vote up 6 votes
public LeftPanelWidget(PlannerFormWidget plannerForm,
		ItineraryStackWidget itineraryStack, AlertStackWidget alertStack,
		boolean useScrollPanel) {
	verticalPanel = new VerticalPanel();
	verticalPanel.add(plannerForm);
	if (useScrollPanel) {
		VerticalPanel innerScrollPanel = new VerticalPanel();
		innerScrollPanel.add(alertStack);
		innerScrollPanel.add(itineraryStack);
		ScrollPanel scrollPanel = new ScrollPanel(innerScrollPanel);
		scrollPanel.setHeight("100%");
		verticalPanel.add(scrollPanel);
		verticalPanel.setCellHeight(scrollPanel, "100%");
	} else {
		verticalPanel.add(alertStack);
		verticalPanel.add(itineraryStack);
	}
	initWidget(verticalPanel);
	setWidth("100%");
	if (useScrollPanel) {
		setHeight("100%");
	}
}
 
Example 5
Project: EasyML   File: StdPanel.java   View Source Code Vote up 5 votes
protected void init(String msg, String title) {
	this.setTitle("stdErr");
	this.setGlassEnabled(true);

	HTML closeButton = new HTML("X");
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");
	closeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			StdPanel.this.hide();
		}
	});

	ScrollPanel scvp = new ScrollPanel();
	VerticalPanel verticalPanel = new VerticalPanel();

	verticalPanel.add(closeButton);
	verticalPanel.setCellHeight(closeButton, "30px");
	verticalPanel.setStyleName("vpanel");
	HTML desc = new HTML(title);
	desc.setStyleName("popupTitle");
	verticalPanel.add(desc);
	verticalPanel.setCellHeight(desc, "30px");

	TextArea label = new TextArea();
	label.setText(msg);
	label.setReadOnly(true);
	label.setSize("650px", "400px");
	verticalPanel.add(label);
	scvp.add(verticalPanel);
	this.add(scvp);
	this.setStyleName("loading_container");
	this.center();
	this.show();
}
 
Example 6
Project: appinventor-extensions   File: MotdUi.java   View Source Code Vote up 5 votes
/**
 * Creates a new output panel for MOTD.
 */
private MotdUi() {
  // Initialize UI
  text = new HTML();
  text.setSize("100%", "100%");
  text.setStylePrimaryName("ode-Motd");

  panel = new VerticalPanel();
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
Example 7
Project: appinventor-extensions   File: MessagesOutput.java   View Source Code Vote up 5 votes
/**
 * Creates a new output panel for messages.
 */
private MessagesOutput() {
  // Initialize UI
  text = new HTML();
  text.setSize("100%", "100%");
  text.setStylePrimaryName("ode-MessagesOutput");

  panel = new VerticalPanel();
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
Example 8
Project: optaplanner-wb   File: MultiConstraintHardSoftMatchRuleModellerWidget.java   View Source Code Vote up 5 votes
public MultiConstraintHardSoftMatchRuleModellerWidget(final RuleModeller mod,
                                                      final EventBus eventBus,
                                                      final ActionMultiConstraintHardSoftMatch actionConstraintMatch,
                                                      final TranslationService translationService,
                                                      final Boolean readOnly) {
    super(mod,
          eventBus,
          translationService);
    hardConstraintMatchInputWidget = new ConstraintMatchInputWidget(actionConstraintMatch.getActionHardConstraintMatch());
    hardConstraintMatchInputWidget
            .addConstraintMatchValueChangeHandler(new ConstraintMatchValueChangeHandler(actionConstraintMatch.getActionHardConstraintMatch()));
    softConstraintMatchInputWidget = new ConstraintMatchInputWidget(actionConstraintMatch.getActionSoftConstraintMatch());
    softConstraintMatchInputWidget
            .addConstraintMatchValueChangeHandler(new ConstraintMatchValueChangeHandler(actionConstraintMatch.getActionSoftConstraintMatch()));

    VerticalPanel verticalPanel = new VerticalPanel();

    HorizontalPanel labelPanel = createLabelPanel(translationService.getTranslation(GuidedRuleEditorConstants.RuleModellerActionPlugin_MultiConstraintMatch));
    verticalPanel.add(labelPanel);
    verticalPanel.setCellHeight(labelPanel,
                                "25px");

    verticalPanel.add(getItemPanel(translationService.getTranslation(GuidedRuleEditorConstants.RuleModellerActionPlugin_HardScore),
                                   hardConstraintMatchInputWidget));

    verticalPanel.add(getItemPanel(translationService.getTranslation(GuidedRuleEditorConstants.RuleModellerActionPlugin_SoftScore),
                                   softConstraintMatchInputWidget));

    verticalPanel.setStyleName(GuidedRuleEditorResources.INSTANCE.css().multiConstraintMatch());

    initWidget(verticalPanel);
}
 
Example 9
Project: onecmdb   File: DragablePopup.java   View Source Code Vote up 5 votes
public void load() {
	VerticalPanel panel = new VerticalPanel();
	HorizontalPanel header = new HorizontalPanel();
	header.setStyleName("one-select-popup-header");
	header.setWidth("100%");
	Label headerLabel = new Label(title);
	Image close = new Image("images/eclipse/close.gif");
	header.add(headerLabel);
	header.add(close);
	
	header.setCellHorizontalAlignment(headerLabel, HorizontalPanel.ALIGN_LEFT);
	header.setCellHorizontalAlignment(close, HorizontalPanel.ALIGN_RIGHT);
	header.setCellVerticalAlignment(close, HorizontalPanel.ALIGN_MIDDLE);
	
	// Add drag control.
	new DragControl(this, headerLabel);
	
	close.addClickListener(new ClickListener() {
		public void onClick(Widget sender) {
			hide();	
		}
	});
	panel.add(header);
	panel.add(content);
	
	panel.setCellVerticalAlignment(header, VerticalPanel.ALIGN_TOP);
	panel.setCellVerticalAlignment(content, VerticalPanel.ALIGN_TOP);
	panel.setCellHeight(content, "100%");
	setWidget(panel);
}
 
Example 10
Project: firefly   File: PopupPane.java   View Source Code Vote up 5 votes
protected Widget makeSideHeader() {

        Widget close = makeCloseButton(false);

        SimplePanel panel= new SimplePanel();
        panel.addStyleName(_ffCss.titleBgColor());
        panel.addStyleName(_ffCss.titleColor());
        panel.setHeight("100%");


        VerticalPanel header = new VerticalPanel();
        titleLabel.addStyleName("title-label");
        titleLabel.setHeight("100%");
        DOM.setStyleAttribute(titleLabel.getElement(), "cursor", "default");

        GwtUtil.setStyle(header, "paddingTop", "3px");

        titleLabel.setHTML(" ");

        header.addStyleName(_ffCss.popupTitleVerticalBackground());
        header.addStyleName(_ffCss.titleBgColor());
        header.addStyleName(_ffCss.titleColor());
//        header.addStyleName(_ffCss.popupBackground());

        header.add(close);
        header.add(titleLabel);
        header.setCellHeight(titleLabel, "100%");
        header.setWidth("15px");
        header.setHeight("100%");

        panel.setWidget(header);
        return panel;
    }
 
Example 11
Project: EasyML   File: PreviewPopupPanel.java   View Source Code Vote up 4 votes
/**
 * Initialize
 * 
 * @param path  Result root address
 */
protected void init(String path) {
	this.setSize("650px", "400px");
	this.setGlassEnabled(true);
	this.setModal(true);
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");
	closeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			PreviewPopupPanel.this.hide();
		}
	});
	VerticalPanel verticalPanel = new VerticalPanel();
	verticalPanel.add(closeButton);
	verticalPanel.setCellHeight(closeButton, "13px");
	verticalPanel.setStyleName("vpanel");
	desc.setStyleName("popupTitle");
	verticalPanel.add(desc);
	verticalPanel.setCellHeight(desc, "30px");

	HorizontalPanel hPanel = new HorizontalPanel();
	savebtn.setStyleName("popupsavebtn");
	savebtn.setVisible(false);
	refreshBtn.setStyleName("popuprefreshbtn");
	refreshBtn.setVisible(false);
	uploadSubmitButton.setVisible(false);
	hPanel.add(uploadSubmitButton);
	hPanel.add(savebtn);
	hPanel.add(refreshBtn);
	hPanel.setCellVerticalAlignment(uploadSubmitButton,
			HasVerticalAlignment.ALIGN_BOTTOM);

	tabPanel.getElement().getStyle().setMarginBottom(10.0, Unit.PX);
	tabPanel.setSize("650px", "355px");
	dirPanel = new HorizontalPanel();
	resultDirTree = PopupRetDirTreeLoad.load(path);
	resultDirTree.getRoot().setState(false);
	ScrollPanel dirScrollPanel = new ScrollPanel();
	dirScrollPanel.add(resultDirTree);
	dirScrollPanel.setAlwaysShowScrollBars(true);
	dirScrollPanel.setSize("300px", "320px");

	VerticalPanel fileViewPanel = new VerticalPanel();
	fileLabel.setText("Please select a file to view!");
	fileLabel.setStyleName("popupFileSelectName");
	fileViewPanel.add(fileLabel);
	fileTextArea.setStyleName("popupMsg");
	fileTextArea.setSize("342px", "298px");
	fileTextArea.getElement().setAttribute("wrap", "off");    
	fileTextArea.setReadOnly(true);
	fileViewPanel.add(fileTextArea);
	dirPanel.add(dirScrollPanel);
	dirPanel.add(fileViewPanel);
	tabPanel.add(dirPanel,"Results directory");

	AbsolutePanel bottomPanel = new AbsolutePanel(); 
	bottomPanel.setSize("650px", "360px");
	bottomPanel.add(tabPanel, 0, 0);
	bottomPanel.add(hPanel,460,3);

	fileSizeLabel.setStyleName("popupFileSelectName");
	verticalPanel.add(bottomPanel); 
	verticalPanel.add(fileSizeLabel);
	this.add(verticalPanel);
	this.setStyleName("loading_container");
}
 
Example 12
Project: EasyML   File: HistoryPopupPanel.java   View Source Code Vote up 4 votes
/**
 * UI Initialization
 */
protected void init() {
	this.setSize("850px", "400px");
	this.setGlassEnabled(true);
	this.setModal(true);

	desc.setText(desc.getText()+"  Job Id - "+bdaJobId);
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");

	VerticalPanel topPanel = new VerticalPanel(); //Outermost vertical panel
	topPanel.add(closeButton);
	topPanel.setCellHeight(closeButton, "13px");
	topPanel.setStyleName("vpanel");
	desc.setStyleName("popupTitle");
	topPanel.add(desc);
	topPanel.setCellHeight(desc, "30px");

	HorizontalPanel optPanel = new HorizontalPanel(); //Operation panel(include search, batch delete.etc)
	optPanel.addStyleName("run-history-optPanel");
	DateTimeFormat pickerFormat = DateTimeFormat.getFormat("yyyy-MM-dd");
	startTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat));
	startTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup");
	endTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat));
	endTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup");
	searchBtn.removeStyleName("gwt-Button");
	searchBtn.addStyleName("run-history-search-button");
	//The initial time is set to 2016-1-1
	endTime = new Date();
	DateTimeFormat tmpFormatter = DateTimeFormat.getFormat("yyyy-MM-dd");
	startTime = tmpFormatter.parse("2016-01-01");
	selectAllChkBox.setVisible(false);
	batchDelBtn.removeStyleName("gwt-Button");
	batchDelBtn.addStyleName("run-history-batch-del-button");

	optPanel.add(startTimeLabel); 
	optPanel.add(startTimeBox);
	optPanel.add(endTimeLabel);
	optPanel.add(endTimeBox);
	optPanel.add(searchBtn);
	if(isExample && !AppController.power.equals("111"))  //Example job only can be deleted by administrator privileges
	{}
	else
		optPanel.add(batchDelBtn);
	optPanel.add(selectAllChkBox);

	runHistoryGrid.addStyleName("run-history-table"); //Data view
	runHistoryGrid.addStyleName("table-striped");
	runHistoryGrid.addStyleName("table-hover");
	runHistoryGrid.resize(rowNum, colNum);
	for(int i=0;i<colNum;i++)
	{
		runHistoryGrid.setText(0, i, columns[i]);
	}
	initGridData();

	topPanel.add(optPanel);
	topPanel.add(runHistoryGrid);

	VerticalPanel bottomPanel = new VerticalPanel(); //Paging control
	bottomPanel.add(pageGrid);
	bottomPanel.addStyleName("run-history-bottomPanel");

	VerticalPanel panel = new VerticalPanel();
	panel.add(topPanel);
	panel.add(bottomPanel);

	this.add(panel);
	this.setStyleName("loading_container");
}
 
Example 13
Project: EasyML   File: DataTypeSelectPanel.java   View Source Code Vote up 4 votes
/**
 * UI initialization
 */
public void init()
{
	this.setSize("480px", "100px");

	//Dialog box title
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");

	//Selection dialog
	HorizontalPanel typeListPanel = new HorizontalPanel();
	typeListPanel.setStyleName("popupDatatypeSelectPanel");
	typeListBox = new ListBox();
	typeListBox.setWidth("120px");
	typeListBox.addItem("----");
	typeListBox.addItem(DatasetType.GENERAL.getDesc());
	typeListBox.addItem(DatasetType.CSV.getDesc());
	typeListBox.addItem(DatasetType.TSV.getDesc());
	typeListBox.addItem(DatasetType.JSON.getDesc());
	if(dataset.getContenttype() == null || dataset.getContenttype() .equals(""))
		typeListBox.setSelectedIndex(0);
	else
	{
		for(int i = 0 ; i<typeListBox.getItemCount() ; i++)
		{
			if(typeListBox.getItemText(i).equals(dataset.getContenttype()))
			{
				typeListBox.setSelectedIndex(i);
				break;
			}
		}
	}
	Label selectLabel = new Label("Select data type: ");
	typeListPanel.add(selectLabel);
	typeListPanel.add(typeListBox);

	//Ok and cancel button
	HorizontalPanel buttonPanel = new HorizontalPanel();
	buttonPanel.setStyleName("popupDatatypeButtonPanel");
	okBtn = new Button("Ok");
	okBtn.setStyleName("button-style");
	cancelBtn = new Button("Cancel");
	cancelBtn.setStyleName("button-style");
	buttonPanel.add(okBtn);
	buttonPanel.add(cancelBtn);

	//Overall arrangement
	VerticalPanel topPanel = new VerticalPanel();
	topPanel.add(closeButton);
	topPanel.setCellHeight(closeButton, "13px");
	topPanel.setStyleName("vpanel");
	desc.setStyleName("popupDatatypeSelectTitle");
	topPanel.add(desc);
	topPanel.setCellHeight(desc, "30px");
	topPanel.add(typeListPanel);
	topPanel.add(buttonPanel);

	this.setGlassEnabled(true);
	this.setModal(true);
	this.add(topPanel);
	this.center();
	this.setStyleName("loading-panel");
}
 
Example 14
Project: onecmdb   File: ReferenceCIScreen.java   View Source Code Vote up 4 votes
protected void update() {
	setTitleWidget(new CIIconDisplayNameWidget(bean));
	relationPanel.clear();
	InstanceReferenceTreeControl outboundTreeControl = new InstanceReferenceTreeControl();
	outboundTreeControl.setClickListener(getReferenceClickListener());
	outboundTreeControl.setRootInstance(bean);
	outboundTreeControl.setHideRoot(true);
	CITreeWidget outboundTreeWidget = new CITreeWidget(outboundTreeControl);
	
	Label outboundLabel = new Label("Outbound References");
	outboundLabel.setStyleName("one-screen-header-title");
	/*
	HTML click = new HTML("<a href ='javascript:;'>inbound</a>");
	click.addClickListener(new ClickListener() {

		public void onClick(Widget sender) {
			getBaseEntryScreen().showScreen(OneCMDBApplication.REFERENCE_CI_SCREEN, control.getBase().getAlias(), new Long(0));
		}
	});
	*/
	VerticalPanel outboundPanel = new VerticalPanel();
	outboundPanel.setHeight("100%");
	outboundPanel.setStyleName("mdv-form");
	outboundPanel.add(outboundLabel);
	outboundPanel.add(outboundTreeWidget);
	outboundPanel.setCellHeight(outboundTreeWidget, "100%");
	outboundPanel.setCellVerticalAlignment(outboundTreeWidget, VerticalPanel.ALIGN_TOP);

	
	
	Label inboundLabel = new Label("Inbound References");
	inboundLabel.setStyleName("one-screen-header-title");
	
	InstanceInboundReferenceTreeControl inboundTreeControl = new InstanceInboundReferenceTreeControl(bean);
	inboundTreeControl.setClickListener(getReferenceClickListener());
	inboundTreeControl.setHideRoot(true);
	inboundTreeControl.setShowSearch(false);
	
	ReverseTreeTable inboundTreeWidget = new ReverseTreeTable(inboundTreeControl);
	

	VerticalPanel inboundPanel = new VerticalPanel();
	inboundPanel.setHeight("100%");
	inboundPanel.setStyleName("mdv-form");
	inboundPanel.add(inboundLabel);
	inboundPanel.add(inboundTreeWidget);
	inboundPanel.setCellHeight(inboundTreeWidget, "100%");
	inboundPanel.setCellVerticalAlignment(inboundTreeWidget, VerticalPanel.ALIGN_TOP);
	
	VerticalPanel centerPanel = new VerticalPanel();
	centerPanel.setHeight("100%");
	centerPanel.setStyleName("mdv-form");
	Label centerLabel = new Label("CI");
	centerLabel.setStyleName("one-screen-header-title");
	centerPanel.add(centerLabel);
	CIIconDisplayNameWidget widget = new CIIconDisplayNameWidget(bean, getCenterClickListener());
	centerPanel.add(widget);
	centerPanel.setCellHeight(widget, "100%");
	centerPanel.setCellVerticalAlignment(widget, VerticalPanel.ALIGN_TOP);
	
	relationPanel.add(inboundPanel);
	relationPanel.add(centerPanel);
	relationPanel.add(outboundPanel);

}
 
Example 15
Project: firefly   File: ResizableLayoutManager.java   View Source Code Vote up 4 votes
public void layout(String rootId) {

        init();

        Region loginRegion = null;
        if (Application.getInstance().getLoginManager()!=null) {
            loginRegion = Application.getInstance().getLoginManager().makeLoginRegion();
        }

        HorizontalPanel hp = new HorizontalPanel();
        hp.add(getSmallIcon().getDisplay());
        hp.add(getSmallIcon2().getDisplay());
        VerticalPanel fp = new VerticalPanel();
        if (loginRegion!=null) {
            fp.add(loginRegion.getDisplay());
            fp.setCellHeight(loginRegion.getDisplay(), "20px");
            fp.setCellHorizontalAlignment(loginRegion.getDisplay(), HorizontalPanel.ALIGN_RIGHT);
        }
        fp.add(hp);
        fp.setCellHeight(hp, "52px");
        fp.setCellHorizontalAlignment(hp, VerticalPanel.ALIGN_CENTER);
        fp.setStyleName("user-info");
        RootPanel.get("user-info").add(fp);


        Widget north = makeNorth();
        Widget center = makeCenter();
        Widget south = makeSouth();
        if (north != null) {
            mainPanel.add(north, DockPanel.NORTH);
            mainPanel.setCellHeight(north, "10px");
//            GwtUtil.DockLayout.setWidgetSize(north, getNorthHeight());
        }

//        if (south != null) {
//            mainPanel.add(south, DockPanel.SOUTH);
//            mainPanel.setCellHeight(south, "60px");
//        }
//
        if (center != null) {
            mainPanel.add(center, DockPanel.CENTER);
            GwtUtil.setStyle(center, "padding", "0 10px");
        }


        if (rootId != null) {
            RootPanel root = RootPanel.get(rootId);
            if (root == null) {
                throw new RuntimeException("Application is not setup correctly; unable to find " + rootId);
            }
            root.add(mainPanel);
        } else {
            RootPanel.get().add(mainPanel);
        }
//        mainPanel.add(resizer, DockPanel.WEST);
//        mainPanel.setCellWidth(resizer, "15px");

        mainPanel.setSize("100%", "100%");

//        // now.. add the menu to the top
        getMenu().setDisplay(Application.getInstance().getToolBar().getWidget());
        resize();

    }