本文整理汇总了Java中com.smartgwt.client.widgets.layout.VLayout.setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java VLayout.setBackgroundColor方法的具体用法?Java VLayout.setBackgroundColor怎么用?Java VLayout.setBackgroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.smartgwt.client.widgets.layout.VLayout
的用法示例。
在下文中一共展示了VLayout.setBackgroundColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DigitalObjectPreview
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
public DigitalObjectPreview(ClientMessages i18n) {
this.i18n = i18n;
zoomValues = new ValuesManager();
zoomValues.setValue(FIELD_ZOOM, Zoom.FIT_PANEL);
VLayout imgContainer = new VLayout();
imgContainer.setAlign(Alignment.CENTER);
windowContainer = new VLayout();
windowContainer.setAlign(Alignment.CENTER);
windowContainer.setWidth100();
windowContainer.setHeight100();
imageWindow = createFullImageWindow(windowContainer);
previewLayout = new VLayout();
previewLayout.setBackgroundColor(BACKGROUND_COLOR);
previewLayout.addMember(imgContainer);
previewLoadTask = new ImageLoadTask(imgContainer,
new Zoom(zoomValues.getValueAsString(FIELD_ZOOM)), false, i18n);
}
示例2: createDisplayLabel
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private VLayout createDisplayLabel() {
i_label = new Label("<b>" + MESSAGE + "<b>");
i_label.setWidth100();
i_label.setHeight(30);
i_label.setMargin(2);
i_label.setValign(VerticalAlignment.CENTER);
i_label.setBackgroundColor(BACKGROUND_COLOR);
final VLayout vLayoutLayoutSpacers = new VLayout();
vLayoutLayoutSpacers.setWidth100();
vLayoutLayoutSpacers.setHeight(30);
vLayoutLayoutSpacers.setBackgroundColor(BACKGROUND_COLOR);
vLayoutLayoutSpacers.setLayoutMargin(6);
vLayoutLayoutSpacers.setMembersMargin(6);
vLayoutLayoutSpacers.addMember(i_label);
return vLayoutLayoutSpacers;
}
示例3: createDisplayLabel
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private VLayout createDisplayLabel() {
i_label = new Label("<b>HTP Information Message<b>");
i_label.setWidth100();
i_label.setHeight(30);
i_label.setMargin(2);
i_label.setValign(VerticalAlignment.CENTER);
i_label.setBackgroundColor(BACKGROUND_COLOR);
final VLayout vLayoutLayoutSpacers = new VLayout();
vLayoutLayoutSpacers.setWidth100();
vLayoutLayoutSpacers.setHeight(30);
vLayoutLayoutSpacers.setBackgroundColor(BACKGROUND_COLOR);
vLayoutLayoutSpacers.setLayoutMargin(6);
vLayoutLayoutSpacers.setMembersMargin(6);
// vLayoutLayoutSpacers.setBorder("1px dashed red");
vLayoutLayoutSpacers.addMember(i_label);
return vLayoutLayoutSpacers;
}
示例4: createStackSection
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private Canvas createStackSection(String color) {
VLayout stackSection = new VLayout(5);
stackSection.setBackgroundColor(color);
stackSection.setAlign(VerticalAlignment.TOP);
stackSection.setLayoutTopMargin(5);
stackSection.setLayoutLeftMargin(5);
stackSection.setWidth100();
stackSection.setHeight100();
return stackSection;
}
示例5: buildWidget
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
Widget buildWidget() {
VLayout content = new VLayout();
content.setBackgroundColor("beige");
content.addMember(createToolStrip());
content.addMember(createSpacer(5));
content.addMember(createNameValueGrid());
content.addMember(createSpacer(10));
content.addMember(createButtonBar());
window.addItem(content);
return window;
}
示例6: SearchPanel
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
* The only constructor.
*
* @param mapModel
* The map's model. It knows what layers we can search in.
* @param parent
* The map's parent widget. We use this to attach the search layout to.
*/
public SearchPanel(final MapModel mapModel, final Canvas parent) {
// Set some parameters:
setTop(TOP_OFFSET);
setLeft(parent.getWidth() - BTN_WIDTH - 8);
setWidth(BTN_WIDTH);
setHeight(BTN_WIDTH + BTN_WIDTH + 8);
setStyleName("search_panel_buttons");
// Create the button GUI:
createButtonGui();
// Create the 2 panels:
panelLayout = new VLayout();
panelLayout.setBackgroundColor("${symbol_pound}647386");
panelLayout.setTop(TOP_OFFSET);
panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
panelLayout.setHeight(PANEL_HEIGHT);
panelLayout.setWidth(PANEL_WIDTH);
panelLayout.setStyleName("search_panel");
panelLayout.setVisible(false);
gridPanel = createGridPanel(mapModel);
searchPanel = createSearchPanel(mapModel);
panelLayout.addChild(searchPanel);
panelLayout.addChild(gridPanel);
parent.addChild(panelLayout);
// Add a handler that makes sure this widget is placed at the correct location when the parent widget resizes:
parent.addResizedHandler(new ResizedHandler() {
public void onResized(ResizedEvent event) {
setTop(TOP_OFFSET);
setLeft(parent.getWidth() - BTN_WIDTH - 8);
panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
}
});
}
示例7: SearchPanel
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
* The only constructor.
*
* @param mapModel
* The map's model. It knows what layers we can search in.
* @param parent
* The map's parent widget. We use this to attach the search layout to.
*/
public SearchPanel(final MapModel mapModel, final Canvas parent) {
// Set some parameters:
setTop(TOP_OFFSET);
setLeft(parent.getWidth() - BTN_WIDTH - 8);
setWidth(BTN_WIDTH);
setHeight(BTN_WIDTH + BTN_WIDTH + 8);
setStyleName("search_panel_buttons");
// Create the button GUI:
createButtonGui();
// Create the 2 panels:
panelLayout = new VLayout();
panelLayout.setBackgroundColor("#647386");
panelLayout.setTop(TOP_OFFSET);
panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
panelLayout.setHeight(PANEL_HEIGHT);
panelLayout.setWidth(PANEL_WIDTH);
panelLayout.setStyleName("search_panel");
panelLayout.setVisible(false);
gridPanel = createGridPanel(mapModel);
searchPanel = createSearchPanel(mapModel);
panelLayout.addChild(searchPanel);
panelLayout.addChild(gridPanel);
parent.addChild(panelLayout);
// Add a handler that makes sure this widget is placed at the correct location when the parent widget resizes:
parent.addResizedHandler(new ResizedHandler() {
public void onResized(ResizedEvent event) {
setTop(TOP_OFFSET);
setLeft(parent.getWidth() - BTN_WIDTH - 8);
panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
}
});
}
示例8: init
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private void init() {
setWidth(WIDTH);
setHeight100();
setAlign(Alignment.CENTER);
Label titleLabel = new Label();
titleLabel.setContents(TITLE);
// header layout
HLayout titleLayout = new HLayout();
titleLayout.setWidth(WIDTH);
titleLayout.setHeight(10);
titleLayout.setAlign(Alignment.CENTER);
titleLayout.addMember(titleLabel);
// layout to hold the form
i_formLayout = new VLayout();
i_formLayout.setBackgroundColor(BACKGROUND_COLOR);
i_formLayout.setAlign(Alignment.CENTER);
i_formLayout.setWidth(WIDTH);
i_formLayout.setHeight(HEIGHT);
i_formLayout.setBorder("2px solid gray");
i_formLayout.addMember(titleLayout);
getUploadFormDetails();
addMember(i_formLayout);
exportNativeMethods();
zipTextItem.disable();
zipTextItem.hide();
}
示例9: createGraphOptions
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
* This methods will create an option layout and call the method
* createOptionForms() to create different options to create graph
*
* @param demographics
*/
public void createGraphOptions(final List<Demographic> demographics) {
final VLayout graphOptionLayout = new VLayout();
graphOptionLayout.setBackgroundColor(BACKGROUND_COLOR);
graphOptionLayout.setWidth(100);
graphOptionLayout.setHeight(20);
i_graphOptionForm = createOptionForms(demographics);
graphOptionLayout.setMembers(i_graphOptionForm);
i_mainChartPanel.addMember(graphOptionLayout);
}
示例10: createGraphOptions
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
* This methods will create an option layout to create different options to
* create graph
*
*/
public void createGraphOptions() {
i_graphOptionLayout = new VLayout();
i_graphOptionLayout.setBackgroundColor(BACKGROUND_COLOR);
i_graphOptionLayout.setWidth100();
i_graphOptionLayout.setHeight(20);
i_graphOptionForm = createOptionsForm();
i_graphOptionLayout.addMember(i_graphOptionForm);
i_mainLayout.addMember(i_graphOptionLayout);
}
示例11: buildAndShow
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
* Creates the layout and adds it to the page
*
* <pre>
* +- content:VLayout --------+
* |+- tools:Widget ---------+|
* || # buildTools() ||
* |+------------------------+|
* |+- stack:SectionStack ---+|
* ||+- jobSection ---------+||
* |||+- topPane:Layout ---+|||
* |||| # buildTopPane() ||||
* |||+--------------------+|||
* ||+----------------------+||
* ||+- detailsSection -----+||
* |||+- botPane:Layout ---+|||
* |||| # buildBotPane() ||||
* |||+--------------------+|||
* ||+----------------------+||
* |+------------------------+|
* +--------------------------+
* </pre>
*
*/
private void buildAndShow() {
VLayout contentLayout = new VLayout();
this.rootLayout = contentLayout;
contentLayout.setWidth100();
contentLayout.setHeight100();
contentLayout.setBackgroundColor("#fafafa");
this.aboutWindow = new AboutWindow();
this.settingsWindow = new SettingsWindow(controller);
Canvas tools = buildTools();
HorizontalPanel panel = new HorizontalPanel();
panel.setWidth("100%");
panel.setHeight("3px");
panel.getElement().getStyle().setBackgroundColor("#f47930");
panel.getElement().getStyle().setPadding(-1, Unit.PX);
SectionStackSection executionsSections = this.controller.buildExecutionsView();
Layout botPane = buildBotPane();
SectionStackSection detailsSection = new SectionStackSection();
detailsSection.setTitle("Details");
detailsSection.setExpanded(true);
detailsSection.setItems(botPane);
SectionStack stack = new SectionStack();
stack.setWidth100();
stack.setHeight100();
stack.setMargin(2);
stack.setVisibilityMode(VisibilityMode.MULTIPLE);
stack.setAnimateSections(true);
stack.setOverflow(Overflow.HIDDEN);
stack.setSections(executionsSections, detailsSection);
contentLayout.addMember(buildLogoStrip());
contentLayout.addMember(tools);
contentLayout.addMember(panel);
contentLayout.addMember(stack);
this.logWindow = new LogWindow(controller);
this.rootLayout.draw();
}
示例12: build
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private void build() {
HLayout pane = new HLayout();
pane.setWidth100();
pane.setHeight(240);
pane.setBackgroundColor("#ffffff");
HTMLPane text = new HTMLPane();
text.setContents(Config.get().getAboutText());
text.setWidth100();
text.setStyleName("paddingLeftAndRight");
Img img = new Img(ImagesUnbundled.ABOUT_115, 115, 130);
pane.addMember(img);
pane.addMember(text);
HLayout buttons = new HLayout();
buttons.setAlign(Alignment.RIGHT);
buttons.setWidth100();
buttons.setHeight(20);
buttons.setMargin(10);
IButton ok = new IButton("Close");
ok.setIcon(Images.instance.cancel_16().getSafeUri().asString());
ok.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
AboutWindow.this.hide();
}
});
buttons.addMember(ok);
VLayout root = new VLayout();
root.setBackgroundColor("#dddddd");
root.setWidth100();
root.setHeight100();
root.addMember(pane);
root.addMember(buttons);
this.window = new Window();
this.window.setTitle("About");
this.window.setShowMinimizeButton(false);
this.window.setShowShadow(true);
this.window.setIsModal(true);
this.window.setShowModalMask(true);
this.window.addItem(root);
this.window.setWidth(600);
this.window.setHeight(319);
this.window.centerInPage();
this.window.setCanDragReposition(false);
}
示例13: build
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private void build() {
HLayout pane = new HLayout();
pane.setWidth100();
pane.setHeight(150);
pane.setBackgroundColor("#ffffff");
String str = "<h3>Connect a node to the Resource Manager using the following way</h3><ul>" +
"<li><a target='_blank' href='" + Config.get().getRestPublicUrlOrGuessRestUrl() +
"/node.jar'>Download</a> the node's JAR file</li>" +
"<li>Create credential file (Portal->Create Credentials) </li>" +
"<li>Run from command line:<br/><br/><input type='text' value='java -jar node.jar -f <CREDENTIAL_FILE> -r " +
RMConfig.get().getRMUrl() + "' style='width:270px;border-style:none' disabled></li>";
HTMLPane text = new HTMLPane();
text.setContents(str);
text.setCanSelectText(true);
text.setWidth100();
Img img = new Img(ImagesUnbundled.ABOUT_115, 115, 130);
pane.addMember(img);
pane.addMember(text);
HLayout buttons = new HLayout();
buttons.setAlign(Alignment.RIGHT);
buttons.setWidth100();
buttons.setHeight(20);
buttons.setMargin(5);
IButton ok = new IButton("Close");
ok.setIcon(Images.instance.cancel_16().getSafeUri().asString());
ok.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
AddNodeWindow.this.hide();
}
});
buttons.addMember(ok);
VLayout root = new VLayout();
root.setBackgroundColor("#dddddd");
root.setWidth100();
root.setHeight100();
root.addMember(pane);
root.addMember(buttons);
this.window = new Window();
this.window.setTitle("Adding a node to the Resource Manager");
this.window.setShowMinimizeButton(false);
this.window.setShowShadow(true);
this.window.setIsModal(true);
this.window.setShowModalMask(true);
this.window.setCanSelectText(true);
this.window.addItem(root);
this.window.setWidth(520);
this.window.setHeight(220);
this.window.centerInPage();
this.window.setCanDragReposition(false);
}
示例14: onModuleLoad
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
public void onModuleLoad() {
VLayout mainLayout = new VLayout();
mainLayout.setWidth100();
mainLayout.setHeight100();
mainLayout.setBackgroundColor("#A0A0A0");
HLayout layout = new HLayout();
layout.setWidth100();
layout.setHeight100();
layout.setMembersMargin(10);
layout.setMargin(10);
// ---------------------------------------------------------------------
// Create the left-side (map and tabs):
// ---------------------------------------------------------------------
map = new MapWidget("mapMain", "app");
final Toolbar toolbar = new Toolbar(map, WidgetLayout.toolbarLargeButtonSize);
toolbar.setBackgroundColor("#647386");
toolbar.setBackgroundImage("");
toolbar.setBorder("0px");
toolbar.addToolbarSeparator();
toolbar.addMenuButton(getReportingMenuButton());
Label title = new Label("Geomajas reporting demo");
title.setStyleName("appTitle");
title.setWidth(260);
toolbar.addFill();
toolbar.addMember(title);
VLayout mapLayout = new VLayout();
mapLayout.addMember(toolbar);
mapLayout.addMember(map);
mapLayout.setHeight("65%");
VLayout leftLayout = new VLayout();
leftLayout.setBorder("10px solid #777777");
leftLayout.setStyleName("round_corner");
leftLayout.addMember(mapLayout);
layout.addMember(leftLayout);
// ---------------------------------------------------------------------
// Create the right-side (layer-tree, legend):
// ---------------------------------------------------------------------
final SectionStack sectionStack = new SectionStack();
sectionStack.setBorder("10px solid #777777");
sectionStack.setStyleName("round_corner");
sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
sectionStack.setCanReorderSections(true);
sectionStack.setCanResizeSections(false);
sectionStack.setSize("250px", "100%");
// LayerTree layout:
SectionStackSection section2 = new SectionStackSection("Layer tree");
section2.setExpanded(true);
LayerTree layerTree = new LayerTree(map);
section2.addItem(layerTree);
sectionStack.addSection(section2);
// Legend layout:
SectionStackSection section3 = new SectionStackSection("Legend");
section3.setExpanded(true);
legend = new Legend(map.getMapModel());
legend.setBackgroundColor("#FFFFFF");
section3.addItem(legend);
sectionStack.addSection(section3);
// Putting the right side layouts together:
layout.addMember(sectionStack);
// ---------------------------------------------------------------------
// Finally draw everything:
// ---------------------------------------------------------------------
mainLayout.addMember(layout);
mainLayout.draw();
// Then initialize:
initialize();
}
示例15: DefaultView
import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
* Construct a default UI with the specified title.
*
* @param applicationTitle title to display
*/
public DefaultView(String applicationTitle) {
VLayout banner = new VLayout();
banner.setLayoutAlign(Alignment.CENTER);
banner.setLayoutAlign(VerticalAlignment.CENTER);
LayoutSpacer spacerTop = new LayoutSpacer();
spacerTop.setHeight(WidgetLayout.loadingScreenTopSpacerHeight);
banner.addMember(spacerTop);
Img logoImg = new Img(logo);
logoImg.setWidth(logoWidth);
logoImg.setHeight(logoHeight);
logoImg.setLayoutAlign(Alignment.CENTER);
logoImg.setLayoutAlign(VerticalAlignment.CENTER);
banner.addMember(logoImg);
Label titleLabel = new Label(applicationTitle);
titleLabel.setWidth(logoWidth);
titleLabel.setHeight(WidgetLayout.loadingScreenTitleHeight);
titleLabel.setLayoutAlign(Alignment.CENTER);
titleLabel.setAlign(Alignment.CENTER);
banner.addMember(titleLabel);
LayoutSpacer spacer = new LayoutSpacer();
banner.addMember(spacer);
VLayout progressLayout = new VLayout();
progressLayout.setBackgroundColor(WidgetLayout.loadingScreenProgressBackgroundColor);
progressLayout.setOpacity(WidgetLayout.loadingScreenProgressOpacity);
progressLayout.setHeight(WidgetLayout.loadingScreenProgressHeight);
progressLayout.setPadding(WidgetLayout.loadingScreenProgressPadding);
label = new Label(I18nProvider.getGlobal().loadScreenDownLoadText());
label.setLayoutAlign(Alignment.CENTER);
label.setWidth100();
label.setHeight(WidgetLayout.loadingScreenProgressLabelHeight);
label.setStyleName("loadingScreenLabel");
label.setOpacity(100);
progressLayout.addMember(label);
progressBar = new Progressbar();
progressBar.setHeight(WidgetLayout.loadingScreenProgressBarHeight);
progressBar.setWidth100();
progressBar.setVertical(false);
progressBar.setLayoutAlign(Alignment.CENTER);
progressBar.setLayoutAlign(VerticalAlignment.CENTER);
progressBar.setOpacity(100);
progressLayout.addMember(progressBar);
banner.addMember(progressLayout);
setBackgroundColor(WidgetLayout.loadingScreenBackgroundColor);
setShowEdges(true);
setShowShadow(true);
setShadowDepth(WidgetLayout.loadingScreenShadowDepth);
setLayoutAlign(Alignment.CENTER);
setLayoutAlign(VerticalAlignment.CENTER);
setWidth(WidgetLayout.loadingScreenWidth);
setHeight(WidgetLayout.loadingScreenHeight);
if (!(WidgetLayout.loadingScreenBackgroundImage == null)) {
setBackgroundImage(WidgetLayout.loadingScreenBackgroundImage);
}
setEdgeOpacity(WidgetLayout.loadingScreenEdgeOpacity);
setAlign(Alignment.CENTER);
addMember(banner);
}