當前位置: 首頁>>代碼示例>>Java>>正文


Java Grid.setStyleName方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.Grid.setStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java Grid.setStyleName方法的具體用法?Java Grid.setStyleName怎麽用?Java Grid.setStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.Grid的用法示例。


在下文中一共展示了Grid.setStyleName方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createGrid

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
/**
 * Create a Grid that describes the job
 */
@SuppressWarnings("deprecation")
private Grid createGrid() {
	Grid grid = new Grid(2, 2);
	grid.setWidth("280px");
	grid.setWidget(0, 0, new Label(Constants.studioUIMsg.jobName()));
	/**
	 * Panel information
	 */

	namebox.setStyleName("boxstyle");
	grid.setWidget(0, 1, namebox);
	grid.setWidget(1, 0, new Label(Constants.studioUIMsg.jobDescription()));

	SubmitListener sl = new SubmitListener();
	namebox.addKeyboardListener(sl);

	descArea.setStyleName("boxstyle");
	descArea.setHeight("auto");
	grid.setWidget(1, 1, descArea);
	grid.setStyleName("bda-newjob-grid");
	return grid;
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:26,代碼來源:JobDescPopupPanel.java

示例2: initGridHead

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
protected void initGridHead(int size){
	this.setSpacing(3);
	paramsGrid = new Grid(size, 3);

	paramsGrid.setStyleName("gridstyle");
	paramsGrid.setBorderWidth(1);
	paramsGrid.setWidth("250px");
	Label nameLabel = new Label(Constants.studioUIMsg.parameter());
	nameLabel.setWidth("65px");
	paramsGrid.setWidget(0, 0, nameLabel);

	Label typeLabel = new Label(Constants.studioUIMsg.type());
	typeLabel.setWidth("40px");
	paramsGrid.setWidget(0, 1, typeLabel);

	Label valueLabel = new Label(Constants.studioUIMsg.value());
	paramsGrid.setWidget(0, 2, valueLabel);
	paramsGrid.setVisible(false);
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:20,代碼來源:ParameterPanel.java

示例3: onInitialize

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
/**
 * Initialize this example.
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
  // Create the text area and toolbar
  RichTextArea area = new RichTextArea();
  area.ensureDebugId("cwRichText-area");
  area.setSize("100%", "14em");
  RichTextToolbar toolbar = new RichTextToolbar(area);
  toolbar.ensureDebugId("cwRichText-toolbar");
  toolbar.setWidth("100%");

  // Add the components to a panel
  Grid grid = new Grid(2, 1);
  grid.setStyleName("cw-RichText");
  grid.setWidget(0, 0, toolbar);
  grid.setWidget(1, 0, area);
  return grid;
}
 
開發者ID:Peergos,項目名稱:Peergos,代碼行數:22,代碼來源:CwRichText.java

示例4: onRender

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
protected void onRender(Element parent, int index) {
        super.onRender(parent, index);
        
        final RichTextArea area = new RichTextArea();
        area.setSize("1000", "600");
        new OrderService().getOrderTemplate(new OrderService.Listener() {
            public void onSuccess(String content) {
                area.setHTML(content);
            }
        });
        RichTextToolbar toolbar = new RichTextToolbar(area);
//        toolbar.setWidth("100%");

        // Add the components to a panel
        Grid grid = new Grid(2, 1);
        grid.setStyleName("cw-RichText");
        grid.setWidget(0, 0, toolbar);
        grid.setWidget(1, 0, area);
//        grid.setSize("100%", "100%");
        add(grid);
        
        Button button = new Button("Save");
        add(button);
    }
 
開發者ID:jbosschina,項目名稱:jcommerce,代碼行數:25,代碼來源:PrintTemplatePanel.java

示例5: NotificationContainer

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
/**
 * Create notification container.
 *
 * @param resources core resources
 */
@Inject
public NotificationContainer(Resources resources) {
  this.resources = resources;

  nGrid = new Grid(0, 1);
  nGrid.setStyleName(resources.notificationCss().notificationPanelContainer());
  add(nGrid);
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:14,代碼來源:NotificationContainer.java

示例6: KeyHelpPopup

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
public KeyHelpPopup() {
  super(true /* autohide */, true /* modal */);
  setStyleName(KeyResources.I.css().helpPopup());

  final Anchor closer = new Anchor(KeyConstants.I.closeButton());
  closer.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          hide();
        }
      });

  final Grid header = new Grid(1, 3);
  header.setStyleName(KeyResources.I.css().helpHeader());
  header.setText(0, 0, KeyConstants.I.keyboardShortcuts());
  header.setWidget(0, 2, closer);

  final CellFormatter fmt = header.getCellFormatter();
  fmt.addStyleName(0, 1, KeyResources.I.css().helpHeaderGlue());
  fmt.setHorizontalAlignment(0, 2, HasHorizontalAlignment.ALIGN_RIGHT);

  final Grid lists = new Grid(0, 7);
  lists.setStyleName(KeyResources.I.css().helpTable());
  populate(lists);
  lists.getCellFormatter().addStyleName(0, 3, KeyResources.I.css().helpTableGlue());

  final FlowPanel body = new FlowPanel();
  body.add(header);
  body.getElement().appendChild(DOM.createElement("hr"));
  body.add(lists);

  focus = new FocusPanel(body);
  focus.getElement().getStyle().setProperty("outline", "0px");
  focus.getElement().setAttribute("hideFocus", "true");
  focus.addKeyPressHandler(this);
  focus.addKeyDownHandler(this);
  add(focus);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:40,代碼來源:KeyHelpPopup.java

示例7: addGrid

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private void addGrid(VerticalPanel fp) {
  grid = new Grid(2, 3);
  grid.setStyleName(Gerrit.RESOURCES.css().infoBlock());
  grid.setText(0, 0, AdminConstants.I.columnProjectName() + ":");
  grid.setWidget(0, 1, project);
  grid.setText(1, 0, AdminConstants.I.headingParentProjectName() + ":");
  grid.setWidget(1, 1, parent);
  grid.setWidget(1, 2, browse);
  fp.add(grid);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:11,代碼來源:CreateProjectScreen.java

示例8: VerifyRulesFiredWidget

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
/**
 * @param rfl List<VeryfyRuleFired>
 * @param scenario = the scenario to add/remove from
 */
public VerifyRulesFiredWidget( final FixtureList rfl,
                               final Scenario scenario,
                               final boolean showResults ) {
    outer = new Grid( 2,
                      1 );
    this.showResults = showResults;
    outer.getCellFormatter().setStyleName( 0,
                                           0,
                                           "modeller-fact-TypeHeader" ); //NON-NLS
    outer.getCellFormatter().setAlignment( 0,
                                           0,
                                           HasHorizontalAlignment.ALIGN_CENTER,
                                           HasVerticalAlignment.ALIGN_MIDDLE );
    outer.setStyleName( "modeller-fact-pattern-Widget" ); //NON-NLS

    outer.setWidget( 0,
                     0,
                     new SmallLabel( TestScenarioConstants.INSTANCE.ExpectRules() ) );
    initWidget( outer );

    FlexTable data = render( rfl,
                             scenario );
    outer.setWidget( 1,
                     0,
                     data );
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:31,代碼來源:VerifyRulesFiredWidget.java

示例9: onInitUI

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
@Override
protected void onInitUI() {
  super.onInitUI();

  tokenLabel = new CopyableLabel("");
  tokenLabel.addStyleName(Gerrit.RESOURCES.css().oauthToken());

  expiresLabel = new Label("");
  expiresLabel.addStyleName(Gerrit.RESOURCES.css().oauthExpires());

  grid = new Grid(2, 2);
  grid.setStyleName(Gerrit.RESOURCES.css().infoBlock());
  grid.addStyleName(Gerrit.RESOURCES.css().oauthInfoBlock());
  add(grid);

  expiredNote = new Label(Util.C.labelOAuthExpired());
  expiredNote.setVisible(false);
  add(expiredNote);

  row(grid, 0, Util.C.labelOAuthToken(), tokenLabel);
  row(grid, 1, Util.C.labelOAuthExpires(), expiresLabel);

  CellFormatter fmt = grid.getCellFormatter();
  fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().topmost());
  fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topmost());
  fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().bottomheader());

  flow = new FlowPanel();
  flow.setStyleName(Gerrit.RESOURCES.css().oauthPanel());
  add(flow);

  Label netrcLabel = new Label(Util.C.labelOAuthNetRCEntry());
  netrcLabel.setStyleName(Gerrit.RESOURCES.css().oauthPanelNetRCHeading());
  flow.add(netrcLabel);
  netrcValue = new CopyableLabel("");
  netrcValue.setStyleName(Gerrit.RESOURCES.css().oauthPanelNetRCEntry());
  flow.add(netrcValue);

  Label cookieLabel = new Label(Util.C.labelOAuthGitCookie());
  cookieLabel.setStyleName(Gerrit.RESOURCES.css().oauthPanelCookieHeading());
  flow.add(cookieLabel);
  cookieValue = new CopyableLabel("");
  cookieValue.setStyleName(Gerrit.RESOURCES.css().oauthPanelCookieEntry());
  flow.add(cookieValue);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:46,代碼來源:MyOAuthTokenScreen.java

示例10: onInitUI

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
@Override
protected void onInitUI() {
  super.onInitUI();

  String url = Gerrit.info().auth().httpPasswordUrl();
  if (url != null) {
    Anchor link = new Anchor();
    link.setText(Util.C.linkObtainPassword());
    link.setHref(url);
    link.setTarget("_blank");
    add(link);
    return;
  }

  password = new CopyableLabel("(click 'generate' to revoke an old password)");
  password.addStyleName(Gerrit.RESOURCES.css().accountPassword());

  generatePassword = new Button(Util.C.buttonGeneratePassword());
  generatePassword.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          doGeneratePassword();
        }
      });

  final Grid userInfo = new Grid(2, 2);
  final CellFormatter fmt = userInfo.getCellFormatter();
  userInfo.setStyleName(Gerrit.RESOURCES.css().infoBlock());
  userInfo.addStyleName(Gerrit.RESOURCES.css().accountInfoBlock());
  add(userInfo);

  row(userInfo, 0, Util.C.userName(), new UsernameField());
  row(userInfo, 1, Util.C.password(), password);

  fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().topmost());
  fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topmost());
  fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().bottomheader());

  final FlowPanel buttons = new FlowPanel();
  buttons.add(generatePassword);
  add(buttons);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:44,代碼來源:MyPasswordScreen.java

示例11: onInitUI

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
@Override
protected void onInitUI() {
  super.onInitUI();
  createWidgets();

  /* top table */
  grid = new Grid(2, 2);
  grid.setStyleName(Gerrit.RESOURCES.css().infoBlock());
  grid.setText(0, 0, Util.C.watchedProjectName());
  final HorizontalPanel hp = new HorizontalPanel();
  hp.add(nameBox);
  hp.add(browse);
  grid.setWidget(0, 1, hp);

  grid.setText(1, 0, Util.C.watchedProjectFilter());
  grid.setWidget(1, 1, filterTxt);

  final CellFormatter fmt = grid.getCellFormatter();
  fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().topmost());
  fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topmost());
  fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().header());
  fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().header());
  fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().bottomheader());

  final FlowPanel fp = new FlowPanel();
  fp.setStyleName(Gerrit.RESOURCES.css().addWatchPanel());
  fp.add(grid);
  fp.add(addNew);
  add(fp);

  /* bottom table */
  add(watchesTab);
  add(delSel);

  /* popup */
  projectsPopup =
      new ProjectListPopup() {
        @Override
        protected void onMovePointerTo(String projectName) {
          // prevent user input from being overwritten by simply poping up
          if (!projectsPopup.isPoppingUp() || "".equals(nameBox.getText())) {
            nameBox.setText(projectName);
          }
        }

        @Override
        protected void openRow(String projectName) {
          nameBox.setText(projectName);
          doAddNew();
        }
      };
  projectsPopup.initPopup(Util.C.projects(), PageLinks.SETTINGS_PROJECTS);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:54,代碼來源:MyWatchedProjectsScreen.java

示例12: createNavWidget

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private Widget createNavWidget() {
    Grid p = new Grid(1, 5);
    p.setStyleName(BoundTable.NAV_STYLE);

    Button b = new Button("<<",
            new ClickListener() {

                public void onClick(Widget sender) {
                    first();
                }
            });
    b.setStyleName(BoundTable.NAV_STYLE);

    if (this.getCurrentChunk() == 0) {
        b.setEnabled(false);
    }

    p.setWidget(0, 0, b);
    b = new Button("<",
            new ClickListener() {

                public void onClick(Widget sender) {
                    previous();
                }
            });
    b.setStyleName(BoundTable.NAV_STYLE);

    if (this.getCurrentChunk() == 0) {
        b.setEnabled(false);
    }

    p.setWidget(0, 1, b);

    b = new Button(">",
            new ClickListener() {

                public void onClick(Widget sender) {
                    next();
                }
            });
    b.setStyleName(BoundTable.NAV_STYLE);

    if (this.getCurrentChunk() == (this.getNumberOfChunks() - 1)) {
        b.setEnabled(false);
    }

    Label l = new Label((this.getCurrentChunk() + 1) + " / "
            + this.getNumberOfChunks());
    p.setWidget(0, 2, l);
    p.getCellFormatter().setHorizontalAlignment(0, 2, HasHorizontalAlignment.ALIGN_CENTER);

    p.setWidget(0, 3, b);
    b = new Button(">>",
            new ClickListener() {

                public void onClick(Widget sender) {
                    last();
                }
            });
    b.setStyleName(BoundTable.NAV_STYLE);

    if (this.getCurrentChunk() == (this.getNumberOfChunks() - 1)) {
        b.setEnabled(false);
    }

    p.setWidget(0, 4, b);

    return p;
}
 
開發者ID:kebernet,項目名稱:gwittir,代碼行數:70,代碼來源:BoundTable.java


注:本文中的com.google.gwt.user.client.ui.Grid.setStyleName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。