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


Java Button.setStyleName方法代碼示例

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


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

示例1: HelloWorld

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
public HelloWorld() {
	HTML html = new HTML("Hello Word");
	refresh = new Button("refresh UI");
	refresh.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			GeneralComunicator.refreshUI();
		}
	});

	vPanel = new VerticalPanel();
	vPanel.add(html);
	vPanel.add(refresh);

	refresh.setStyleName("okm-Input");

	initWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:19,代碼來源:HelloWorld.java

示例2: DebugConsolePopup

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
/**
 * Logout popup
 */
public DebugConsolePopup() {
	// Establishes auto-close when click outside
	super(false, false);

	setText(Main.i18n("debug.console.label"));
	vPanel = new VerticalPanel();
	button = new Button(Main.i18n("button.close"), this);
	text = new HTML(Main.i18n("debug.enable.disable"));

	vPanel.add(new HTML("<br>"));
	vPanel.add(text);
	vPanel.add(Log.getLogger(DivLogger.class).getWidget());
	vPanel.add(new HTML("<br>"));
	vPanel.add(button);
	vPanel.add(new HTML("<br>"));

	vPanel.setCellHorizontalAlignment(button, VerticalPanel.ALIGN_CENTER);

	button.setStyleName("okm-YesButton");

	super.hide();
	Log.getLogger(DivLogger.class).getWidget().setVisible(true);
	setWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:28,代碼來源:DebugConsolePopup.java

示例3: LogoutPopup

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
/**
 * Logout popup
 */
public LogoutPopup() {
	// Establishes auto-close when click outside
	super(false, true);

	vPanel = new VerticalPanel();
	text = new HTML(Main.i18n("logout.logout"));
	button = new Button(Main.i18n("button.close"), this);

	vPanel.setWidth("250px");
	vPanel.setHeight("100px");

	vPanel.add(new HTML("<br>"));
	vPanel.add(text);
	vPanel.add(new HTML("<br>"));
	vPanel.add(button);
	vPanel.add(new HTML("<br>"));

	vPanel.setCellHorizontalAlignment(text, VerticalPanel.ALIGN_CENTER);
	vPanel.setCellHorizontalAlignment(button, VerticalPanel.ALIGN_CENTER);

	button.setStyleName("okm-YesButton");

	super.hide();
	setWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:29,代碼來源:LogoutPopup.java

示例4: create

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
/**
 * Creates dialog box.
 *
 * @param popup - UniversalPopup on which the dialog is based
 * @param title - title placed in the title bar
 * @param innerWidget - the inner widget of the dialog
 * @param dialogButtons - buttons
 */
public static void create(UniversalPopup popup, String title, Widget innerWidget,
    DialogButton[] dialogButtons) {
  // Title
  popup.getTitleBar().setTitleText(title);

  VerticalPanel contents = new VerticalPanel();
  popup.add(contents);

  // Message
  contents.add(innerWidget);

  // Buttons
  HorizontalPanel buttonPanel = new HorizontalPanel();
  for (DialogButton dialogButton : dialogButtons) {
    Button button = new Button(dialogButton.getTitle());
    button.setStyleName(Dialog.getCss().dialogButton());
    buttonPanel.add(button);
    dialogButton.link(button);
  }
  contents.add(buttonPanel);
  buttonPanel.setStyleName(Dialog.getCss().dialogButtonPanel());
  contents.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:32,代碼來源:DialogBox.java

示例5: initializeBox

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
private void initializeBox() {
	changeList = new Button("Change to list view");
	changeList.setStyleName("button");
	changeList.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent arg0) {
			if (enabledTree) {
				enabledTree = false;
				changeList.setText("Change to tree view");
				reloadListData();
			}
			else {
				enabledTree = true;
				changeList.setText("Change to list view");
				reloadTreeData();
			}
		}
	});
	mainPanel.add(changeList);
	filterPanel = searchFields();
	mainPanel.add(filterPanel);
	mainPanel.add(list);
	list.setWidth("100%");
	reloadTreeData();
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:26,代碼來源:EntitiesListBox.java

示例6: createVideoDialog

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
/**
 * Creates video on page!
 */
private static void createVideoDialog(String tutorialId) {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(true, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText("Tutorial Video");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  VerticalPanel DialogBoxContents = new VerticalPanel();
  // Adds Youtube Video
  HTML message = new HTML("<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/" + tutorialId + "?rel=0&autoplay=1\" frameborder=\"0\" allowfullscreen></iframe>");
  message.setStyleName("DialogBox-message");
  FlowPanel holder = new FlowPanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dialogBox.hide();
      }
    });
  ok.setStyleName("DialogBox-button");
  holder.add(ok);
  DialogBoxContents.add(message);
  DialogBoxContents.add(holder);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.center();
  dialogBox.show();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:30,代碼來源:TutorialPanel.java

示例7: createImageDialog

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
/**
 * Enlarges image on page
 */
private static void createImageDialog(String img) {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(true, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  VerticalPanel DialogBoxContents = new VerticalPanel();
  FlowPanel holder = new FlowPanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dialogBox.hide();
      }
    });
  ok.setStyleName("DialogBox-button");

  // Adds Image
  Image image = new Image(img);
  image.addLoadHandler(new LoadHandler() {
      public void onLoad(LoadEvent evt) {
        dialogBox.center();
      }
    });

  image.setStyleName("DialogBox-image");
  holder.add(ok);
  DialogBoxContents.add(image);
  DialogBoxContents.add(holder);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.center();
  dialogBox.show();
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:36,代碼來源:TutorialPanel.java

示例8: SearchMetadata

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
/**
 * SearchMetadata
 */
public SearchMetadata(HasPropertyHandler propertyHandler) {
	formManager = new FormManager(propertyHandler);
	table = new FlexTable();
	scrollPanel = new ScrollPanel(table);

	// Table padding and spacing properties
	formManager.getTable().setCellPadding(2);
	formManager.getTable().setCellSpacing(2);

	groupPopup = new GroupPopup();
	groupPopup.setWidth("300px");
	groupPopup.setHeight("125px");
	groupPopup.setStyleName("okm-Popup");
	groupPopup.addStyleName("okm-DisableSelect");

	addGroup = new Button(Main.i18n("search.add.property.group"), new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			groupPopup.show(UIDockPanelConstants.SEARCH);
		}
	});

	table.setWidget(0, 0, addGroup);
	table.setWidget(1, 0, formManager.getTable());

	addGroup.setStyleName("okm-AddButton");
	addGroup.addStyleName("okm-NoWrap");

	initWidget(scrollPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:34,代碼來源:SearchMetadata.java

示例9: applystyles

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
private void applystyles(final Button button, final boolean buttonEnable) {

        button.setStyleName(VButton.CLASSNAME);
        button.addStyleName(getStyle("tiny"));
        button.addStyleName(getStyle("borderless-colored"));
        button.addStyleName(getStyle("button-no-border"));
        button.addStyleName(getStyle("action-type-padding"));

        if (buttonEnable) {
            return;
        }
        button.addStyleName("v-disabled");
    }
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:14,代碼來源:HtmlButtonRenderer.java

示例10: applyStyles

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
private static void applyStyles(final Button button, final boolean buttonDisabled, final String additionalStyle) {

        button.setStyleName(VButton.CLASSNAME);
        button.addStyleName(getStyle("tiny"));
        button.addStyleName(getStyle("borderless"));
        button.addStyleName(getStyle("button-no-border"));
        button.addStyleName(getStyle("action-type-padding"));
        button.addStyleName(getStyle(additionalStyle));

        if (buttonDisabled) {
            button.addStyleName("v-disabled");
        }
    }
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:14,代碼來源:GridButtonRenderer.java

示例11: ComparisonPanel

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
public ComparisonPanel(List<String> comparison) {
	
	this.riskSessions = comparison;
	
	ppg = new VerticalPanel();
	ppg.setWidth("100%");
	mView = new VerticalPanel();
	
	Label title = new Label("Risk analysis session comparisons");
	title.setStyleName("title");
	ppg.add(title);
	ppg.add(mView);
	
	Button back = new Button("Back");
	back.setStyleName("deleteButton");
	back.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			back();
		}
	});
	
	mView.setStyleName("leftPanelLayer");
	mView.add(back);
	
	computeResults();
	
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:29,代碼來源:ComparisonPanel.java

示例12: onInitUI

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

  Resources.I.style().ensureInjected();
  saveProject = new Button(AdminConstants.I.buttonSaveChanges());
  saveProject.setStyleName("");
  saveProject.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          doSave();
        }
      });

  ExtensionPanel extensionPanelTop =
      new ExtensionPanel(GerritUiExtensionPoint.PROJECT_INFO_SCREEN_TOP);
  extensionPanelTop.put(GerritUiExtensionPoint.Key.PROJECT_NAME, getProjectKey().get());
  add(extensionPanelTop);

  add(new ProjectDownloadPanel(getProjectKey().get(), true));

  initDescription();
  grid = new LabeledWidgetsGrid();
  pluginOptionsPanel = new FlowPanel();
  actionsGrid = new LabeledWidgetsGrid();
  initProjectOptions();
  initAgreements();
  add(grid);
  add(pluginOptionsPanel);
  add(saveProject);
  add(actionsGrid);

  ExtensionPanel extensionPanelBottom =
      new ExtensionPanel(GerritUiExtensionPoint.PROJECT_INFO_SCREEN_BOTTOM);
  extensionPanelBottom.put(GerritUiExtensionPoint.Key.PROJECT_NAME, getProjectKey().get());
  add(extensionPanelBottom);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:39,代碼來源:ProjectInfoScreen.java

示例13: createChangeAction

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
private Button createChangeAction() {
  final Button createChange = new Button(AdminConstants.I.buttonCreateChange());
  createChange.setStyleName("");
  createChange.setTitle(AdminConstants.I.buttonCreateChangeDescription());
  createChange.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          CreateChangeAction.call(createChange, getProjectKey().get());
        }
      });
  return createChange;
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:14,代碼來源:ProjectInfoScreen.java

示例14: createEditConfigAction

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
private Button createEditConfigAction() {
  final Button editConfig = new Button(AdminConstants.I.buttonEditConfig());
  editConfig.setStyleName("");
  editConfig.setTitle(AdminConstants.I.buttonEditConfigDescription());
  editConfig.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          EditConfigAction.call(editConfig, getProjectKey());
        }
      });
  return editConfig;
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:14,代碼來源:ProjectInfoScreen.java

示例15: addCloseToTab

import com.google.gwt.user.client.ui.Button; //導入方法依賴的package包/類
private void addCloseToTab(final TabPanelEntry tab) {
    final Button close = new Button("&times;");
    close.setStyleName("close");
    close.addStyleName(WorkbenchResources.INSTANCE.CSS().tabCloseButton());
    close.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(final ClickEvent event) {
            final WorkbenchPartPresenter.View partToDeselect = tabInvertedIndex.get(tab);
            panelManager.closePlace(partToDeselect.getPresenter().getDefinition().getPlace());
        }
    });

    tab.getTabWidget().addToAnchor(close);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:15,代碼來源:UberTabPanel.java


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