本文整理匯總了Java中com.google.gwt.user.client.ui.AbsolutePanel.setStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java AbsolutePanel.setStyleName方法的具體用法?Java AbsolutePanel.setStyleName怎麽用?Java AbsolutePanel.setStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.AbsolutePanel
的用法示例。
在下文中一共展示了AbsolutePanel.setStyleName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: MenuLockLayer
import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
public MenuLockLayer(CloseMenuHandler closeMenuCallback, int topOffset) {
this.closeMenuCallback = closeMenuCallback;
this.topOffset = topOffset;
getElement().setId("menu-lock-layer-id");
RootPanel.get().add(this, 0, topOffset);
getElement().getStyle().setProperty("right", "0px");
getElement().getStyle().setProperty("bottom", "0px");
getElement().getStyle().setProperty("zIndex", (Integer.MAX_VALUE - 5) + "");
AbsolutePanel blockMouseEventsPanel = new LockLayer();
blockMouseEventsPanel.setStyleName("exo-lockLayer");
blockMouseEventsPanel.getElement().getStyle().setProperty("position", "absolute");
blockMouseEventsPanel.getElement().getStyle().setProperty("left", "0px");
blockMouseEventsPanel.getElement().getStyle().setProperty("top", "0px");
blockMouseEventsPanel.getElement().getStyle().setProperty("right", "0px");
blockMouseEventsPanel.getElement().getStyle().setProperty("bottom", "0px");
add(blockMouseEventsPanel);
}
示例2: makeContent
import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
private void makeContent(boolean over) {
status.setText(DEF_MESSAGE);
status.setStyleName("firefly-mask-msg");
status.addStyleName("normal-text");
status.addStyleName("firefly-mask-msg-alone");
hpanel.add(status);
statusHolder = new AbsolutePanel();
statusHolder.add(hpanel);
statusHolder.setStyleName("firefly-mask");
if (over) statusHolder.addStyleName("firefly-mask-overeverything");
statusHolder.addStyleName("standard-border");
}
示例3: MiniMap
import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
public MiniMap(Dimension size, AreaMap map) {
this.zoom = 1;
this.offset = new Point();
this.items = new HashMap<String, UIMiniItem>();
this.size = new Dimension(size);
this.map = map;
this.mouseDown = false;
this.viewSize = new Dimension(size);
this.factory = new UIMiniItemFactory(getRenderingHints());
setStyleName("miniMap"); //$NON-NLS-1$
getElement().setAttribute("unselectable", "on"); //$NON-NLS-1$ //$NON-NLS-2$
addStyleName("miniMap-zoom" + (int) zoom);
miniMapContent = new AbsolutePanel();
miniMapContent.setStyleName("miniMap-content"); //$NON-NLS-1$
miniMapContent.getElement().setAttribute("unselectable", "on"); //$NON-NLS-1$ //$NON-NLS-2$
add(miniMapContent);
view = new BaseWidget();
view.addStyleName("view"); //$NON-NLS-1$
view.getElement().setAttribute("unselectable", "on"); //$NON-NLS-1$ //$NON-NLS-2$
miniMapContent.add(view, 0, 0);
mask = new MiniMapMask();
miniMapContent.add(mask, 0, 0);
sinkEvents(Event.ONMOUSEDOWN | Event.ONMOUSEMOVE |
Event.ONMOUSEUP | Event.ONCLICK | Event.ONMOUSEWHEEL);
Window.addWindowResizeListener(this);
}
示例4: ResearchManager
import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
public ResearchManager() {
StaticMessages messages =
(StaticMessages) GWT.create(StaticMessages.class);
this.viewX = 0;
this.viewY = 0;
mapContainer = new AbsolutePanel();
mapContainer.setSize(TECH_TREE_WIDTH + "px", TECH_TREE_HEIGHT + "px");
mapContainer.getElement().setAttribute("unselectable", "on");
mapContainer.addStyleName("scrollarea");
rootContainer = new AbsolutePanel();
rootContainer.setStyleName("technologiesTree");
rootContainer.getElement().setAttribute("unselectable", "on");
rootContainer.add(mapContainer);
controller = new ScrollController(this, rootContainer);
controller.setEnabled(false);
// Recherche totale générée par le joueur
JSLabel researchPointLabel = new JSLabel("Recherche");
researchPointLabel.setPixelWidth(100);
researchPointValue = new JSLabel();
researchPointValue.setPixelWidth(120);
researchPointValue.setAlignment(JSLabel.ALIGN_RIGHT);
// Mise en forme des composants
JSRowLayout layout = new JSRowLayout();
layout.addComponent(researchPointLabel);
layout.addComponent(researchPointValue);
researchDialog = new JSDialog("<img src=\"" + Config.getMediaUrl() +
"images/misc/blank.gif\" class=\"iconResearch\"/> " +
messages.research(), false, true, true);
researchDialog.setComponent(layout);
researchDialog.setLocation(20, 20, false);
researchDialog.addDialogListener(this);
}
示例5: makeContent
import com.google.gwt.user.client.ui.AbsolutePanel; //導入方法依賴的package包/類
private void makeContent(ButtonInfo... buttons) {
Label sep = new Label();
sep.setWidth("1px");
status.setText(DEF_MESSAGE);
status.setStyleName("firefly-mask-msg");
status.addStyleName("normal-text");
status.addStyleName("firefly-mask-msg-working");
icon.setStyleName("firefly-mask-icon");
hpanel.add(icon);
hpanel.add(sep);
if (buttons!=null) {
icon.setStyleName("firefly-mask-icon-pad-with-cancel");
Panel vpanel= new VerticalPanel();
vpanel.add(status);
vpanel.add(GwtUtil.getFiller(0, 5));
HorizontalPanel bpanel = new HorizontalPanel();
vpanel.add(bpanel);
for (ButtonInfo bi : buttons) {
if (bi != null) {
Button b = GwtUtil.makeButton(bi.getLabel(), bi.getDesc(), bi.getClickHandler());
bi.setButton(b);
SimplePanel bholder= new SimplePanel();
bholder.setWidget(b);
bholder.setStyleName("firefly-mask-cancel");
bpanel.add(GwtUtil.getFiller(5, 0));
bpanel.add(bholder);
}
}
hpanel.add(vpanel);
}
else {
// cancel= GwtUtil.makeButton("Cancel", "Click to Cancel", null);
icon.setStyleName("firefly-mask-icon-pad-no-cancel");
hpanel.add(status);
}
statusHolder = new AbsolutePanel();
statusHolder.add(hpanel);
statusHolder.setStyleName("firefly-mask");
statusHolder.addStyleName("firefly-mask-overeverything");
statusHolder.addStyleName("standard-border");
}