当前位置: 首页>>代码示例>>Java>>正文


Java PushButton.addStyleDependentName方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.PushButton.addStyleDependentName方法的典型用法代码示例。如果您正苦于以下问题:Java PushButton.addStyleDependentName方法的具体用法?Java PushButton.addStyleDependentName怎么用?Java PushButton.addStyleDependentName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.PushButton的用法示例。


在下文中一共展示了PushButton.addStyleDependentName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AlertButton

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/**
 * @param title The text that will appear on the button face.
 * @param alertStyle the dependent style suffix that will be appended to the default GWT style when the user is to be alerted.
 */
public AlertButton(String title, String alertStyle) {
    button = new PushButton(title);
    button.addStyleDependentName("SMALLER");
    panel = new HorizontalPanel();
    panel.setBorderWidth(1);
    checkBox = new CheckBox();
    panel.add(button);
    button.setSize("66", "21");
    panel.add(checkBox);
    checkBox.setSize("20", "20");
    ClientFactory cf = GWT.create(ClientFactory.class);
    eventBus = cf.getEventBus();
    this.alertStyle = alertStyle;
    eventBus.addHandler(WidgetSelectionChangeEvent.TYPE, updateNeededEventHandler);
    eventBus.addHandler(VariableSelectionChangeEvent.TYPE, variableChangedEventHandler);
    eventBus.addHandler(UpdateFinishedEvent.TYPE, updateFinishedHandler);
    eventBus.addHandler(MapChangeEvent.TYPE, mapChangeHandler);
    initWidget(panel);
    panel.setSize("90", "23");
    this.ensureDebugId("AlertButton");
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:26,代码来源:AlertButton.java

示例2: SettingsWidget

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public SettingsWidget(String title, String panelID, String operationID, String optionID) {
	this.operationID = operationID;
	this.optionID = optionID;
	
	closeButton = new PushButton("Close");
	closeButton.addStyleDependentName("SMALLER");
	closeButton.setTitle("Close settings panel for "+panelID);
	closeButton.addClickListener(closeClick);
	buttonBar = new HorizontalPanel();
	buttonBar.add(closeButton);
	
	datasetButton = new DatasetButton();		
	optionsButton = new OptionsButton(optionID, 300);
	datasetButton.setOffset(0);

	operations = new OperationsWidget(title);
	operations.addClickHandler(operationsClickHandler);

	settingsButton = new PushButton (title);
	settingsButton.addStyleDependentName("SMALLER");
	settingsButton.addClickListener(settingsButtonClick);
	settingsPopup = new PopupPanel(false);

	buttonBar.add(datasetButton);
	buttonBar.add(optionsButton);

	settingsLayout = new FlexTable();
	settingsLayout.setWidget(0, 0, buttonBar);
	settingsLayout.setWidget(1, 0, operations);


	settingsPopup.add(settingsLayout);
	settingsButton.setWidth("65px");
	initWidget(settingsButton);	

}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:37,代码来源:SettingsWidget.java

示例3: LayerSelectorTree

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public LayerSelectorTree(LayerSelectionHandler layerHandler, String firstText,
        boolean showRefreshButton, HTML titleLabel) {
    super();
    this.layerSelectionHandler = layerHandler;

    layerIdWmsUrlToTitle = new HashMap<String, String>();
    layerIdWmsUrlToMenuEntry = new HashMap<String, LayerMenuItem>();


    this.titleLabel = titleLabel;
    this.titleLabel.setHTML(firstText);
    this.titleLabel.setStylePrimaryName("hiddenButton");
    this.titleLabel.addStyleDependentName("title");

    if (showRefreshButton) {
        PushButton button = new PushButton("Refresh");
        button.addStyleDependentName("CentreAndMargin");
        button.setTitle("Click to refresh the layers list");
        button.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                layerSelectionHandler.refreshLayerList();
            }
        });
        add(button);
    }
    
    tree = new Tree();
    add(tree);
}
 
开发者ID:Reading-eScience-Centre,项目名称:edal-java,代码行数:31,代码来源:LayerSelectorTree.java

示例4: OutputControlPanelImpl

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/**
 * @wbp.parser.constructor
 */
public OutputControlPanelImpl(String outputPanelID) {
    ClientFactory clientFactory = GWT.create(ClientFactory.class);

    setName(outputPanelID);

    FlowPanel mainPanel = new FlowPanel();

    HorizontalPanel horizontalPanel_0 = new HorizontalPanel();
    horizontalPanel_0.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel_0.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
    horizontalPanel_0.setSpacing(5);
    mainPanel.add(horizontalPanel_0);

    datasetButton = new DatasetButton();
    datasetButton.setName(outputPanelID);
    horizontalPanel_0.add(datasetButton);

    displayButton = new PushButton("Enlarge Image");
    displayButton.setTitle("Show the plot's image at full size in a new window.");
    displayButton.addStyleDependentName("SMALLER");
    displayButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            listener.onDisplayButtonClick(getImageURL());
        }
    });
    displayButton.setEnabled(false);
    horizontalPanel_0.add(displayButton);

    flexTable = new FlexTable();
    VariableControlsActivity variableControlsPresenter = new VariableControlsActivity(clientFactory, outputPanelID);
    variableControls = variableControlsPresenter.init(outputPanelID);
    // horizontalPanel_0.add(variableControls);
    flexTable.setWidget(0, 0, variableControls);

    mainPanel.add(flexTable);

    mainPanel.setVisible(true);
    // mainPanel.setOpen(true);

    initWidget(mainPanel);
    // initWidget(binder.createAndBindUi(this));
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:47,代码来源:OutputControlPanelImpl.java

示例5: DatasetButton

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public DatasetButton() {
    choose = new PushButton("Data Set");
    choose.setTitle("Select a Data Set.");
    choose.addStyleDependentName("SMALLER");
    choose.addClickHandler(openClick);
    datasetPanel = new PopupPanel(false);
    datasetPanel.setAnimationEnabled(true);
    datasetWidget = new DatasetWidget();
    datasetWidget.setName(name);
    datasetWidget.setHeight("650px");
    datasetWidget.addSelectionHandler(new SelectionHandler<TreeItem>() {
        @Override
        public void onSelection(SelectionEvent<TreeItem> event) {
            TreeItem item = event.getSelectedItem();
            Object u = item.getUserObject();
            if ( u instanceof VariableSerializable ) {
                selectedVariable = (VariableSerializable) u;
                dataset_name.setText(selectedVariable.getDSName());
                variable_name.setText(selectedVariable.getName());
                datasetWidget.setName(name); // setting the name of this datasetWidget as it will be the source of the re-firing of event
                eventBus.fireEvent(event); // this datasetWidget is now the source                    
            }
        }
    });
    datasetWidget.init();
    popupGrid = new Grid(3, 1);
    close = new Button("close");
    close.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent arg0) {
            datasetPanel.hide();
        }
    });
    verticalPanel.add(dataset_name);
    verticalPanel.add(variable_name);
    selection.add(verticalPanel);
    treePanel.add(datasetWidget);
    popupGrid.setWidget(0, 0, close);
    popupGrid.setWidget(1, 0, selection);
    popupGrid.setWidget(2, 0, treePanel);
    datasetPanel.add(popupGrid);
    datasetPanel.hide();
    initWidget(choose);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:45,代码来源:DatasetButton.java


注:本文中的com.google.gwt.user.client.ui.PushButton.addStyleDependentName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。