本文整理汇总了Java中com.google.gwt.user.client.ui.HorizontalPanel.setBorderWidth方法的典型用法代码示例。如果您正苦于以下问题:Java HorizontalPanel.setBorderWidth方法的具体用法?Java HorizontalPanel.setBorderWidth怎么用?Java HorizontalPanel.setBorderWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.HorizontalPanel
的用法示例。
在下文中一共展示了HorizontalPanel.setBorderWidth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AlertButton
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的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");
}
示例2: getColorPanel
import com.google.gwt.user.client.ui.HorizontalPanel; //导入方法依赖的package包/类
private HorizontalPanel getColorPanel(Layer layer) {
HorizontalPanel colorPanel = new HorizontalPanel();
colorPanel.setSize("20px", "20px");
colorPanel.getElement().getStyle()
.setBackgroundColor(getColor(layer, "fillColor"));
colorPanel.setBorderWidth(2);
colorPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
colorPanel.getElement().getStyle()
.setBorderColor(getColor(layer, "strokeColor"));
return colorPanel;
}