本文整理匯總了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;
}