当前位置: 首页>>代码示例>>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;未经允许,请勿转载。