本文整理匯總了Java中com.google.gwt.dom.client.Style.Display類的典型用法代碼示例。如果您正苦於以下問題:Java Display類的具體用法?Java Display怎麽用?Java Display使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Display類屬於com.google.gwt.dom.client.Style包,在下文中一共展示了Display類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DescribeGrid
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
public DescribeGrid(String[][] labarr, String type) {
categoryPanel = new CategoryPanel(type);
categoryPanel.hide();
mask.addStyleName("alertBack");
mask.getElement().getStyle().setDisplay(Display.NONE);
this.add(mask);
this.setStyleName("bda-descgrid");
this.labarr = labarr;
this.type = type;
this.add(leftPanel);
this.add(rightPanel);
leftPanel.setStyleName("bda-descgrid-left");
rightPanel.setStyleName("bda-descgrid-right");
init();
}
示例2: setPagingEnabled
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
/**
* Should paging be enabled. If paging is enabled then only a certain
* amount of items are visible at a time and a scrollbar or buttons are
* visible to change page. If paging is turned of then all options are
* rendered into the popup menu.
*
* @param paging
* Should the paging be turned on?
*/
public void setPagingEnabled(boolean paging) {
debug("VComboBoxMultiselect.SP: setPagingEnabled(" + paging + ")");
if (this.isPagingEnabled == paging) {
return;
}
if (paging) {
this.down.getStyle()
.clearDisplay();
this.up.getStyle()
.clearDisplay();
this.status.getStyle()
.clearDisplay();
} else {
this.down.getStyle()
.setDisplay(Display.NONE);
this.up.getStyle()
.setDisplay(Display.NONE);
this.status.getStyle()
.setDisplay(Display.NONE);
}
this.isPagingEnabled = paging;
}
示例3: showEditorView
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
public void showEditorView(Definition definition) {
// Destruct the explorer components (e.g. the toolbar's event handler)
this.explorerController.destruct();
// Store a new editor controller reference
this.editorController = new EditorController(this, this.explorerController, this.toolbar_webcomponent);
// Initialize the controller's view
this.editorController.initalizeView();
// Initialize required library elements
List<AbstractScopeItem> scopeItems = this.factory.getAvailableScopeItems();
List<EventItemGroup> eventItemGroups = this.factory.getAvailableEventItemGroups();
List<AbstractControlItem> controls = this.factory.getAvailableControlItems();
this.editorController.initializeContent(definition, scopeItems, eventItemGroups, controls);
// Update the toolbar to the editor view
this.toolbar_webcomponent.setupEditorView();
// Show editor container in host page
DOM.getElementById("editor-container").getStyle().setDisplay(Display.BLOCK);
// Remove loading overlayer
LayerManager.getInstance().hideLoadingOverlayer();
}
示例4: showExplorerView
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
public void showExplorerView() {
// Destruct the editor components (e.g. the toolbar's event handler)
this.editorController.destruct();
// Reset reference
this.editorController = null;
// Setup the explorer view
this.explorerController.initializeView();
// Update the toolbar to the explorer view
this.toolbar_webcomponent.setupExplorerView();
// Show explorer container in host page
DOM.getElementById("explorer-container").getStyle().setDisplay(Display.BLOCK);
// Remove loading overlayer
LayerManager.getInstance().hideLoadingOverlayer();
}
示例5: initalizeView
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
/**
* Setup the controller's view
* <p>
* This includes the initialization of the WebComponent, the setup the
* WebComponent (Register EventHandler, ...), and the attachment to the
* WebComponent to parent element
* </p>
*/
public void initalizeView() {
// Create a new actions controller
ActionsController actions_controller = new ActionsController(this);
// Create a new console area and attach event handlers
this.console_webcomponent = new WCConsoleArea("Console");
this.console_webcomponent.addWebComponentEventHandler(this);
// Setup the toolbar
this.toolbar_webcomponent.setHeading("MIBO Editor");
this.toolbar_webcomponent.addWebComponentEventHandler(this);
// Attach the console to the host page and hide it by default
DOM.getElementById("console-container").appendChild(this.console_webcomponent.getElement());
DOM.getElementById("console-container").getStyle().setDisplay(Display.NONE);
// Attach the actions view to the host page
DOM.getElementById("actions-container").appendChild(actions_controller.getView());
}
示例6: destruct
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
public void destruct() {
// Show loading overlayer
LayerManager.getInstance().showLoadingOverlayer();
// De-register the event handler for toolbar events
this.toolbar_webcomponent.removeWebComponentEventHandler(this);
// Hide the editor-specific container elements
DOM.getElementById("editor-container").getStyle().setDisplay(Display.NONE);
// Remove all WebComponent elements that have been created so far
DOM.getElementById("console-container").removeAllChildren();
DOM.getElementById("sections-container-top").removeAllChildren();
DOM.getElementById("sections-container-bottom").removeAllChildren();
DOM.getElementById("actions-container").removeAllChildren();
}
示例7: SuggestionButton
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
public SuggestionButton(final ContentElement element) {
Widget clickButton =
ButtonFactory.createIconClickButton(IconButtonStyle.LIGHTBULB, TOOLTIP,
new ClickButtonListener() {
@Override
public void onClick() {
HasSuggestions suggestion =
element.getProperty(SuggestionRenderer.HAS_SUGGESTIONS_PROP);
element.getSuggestionsManager().showSuggestionsFor(suggestion);
}
});
clickButton.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
// Logically attach it to the root panel to listen to events, but then
// manually move the dom to the desired location.
RootPanel.get().add(clickButton);
this.element = clickButton.getElement();
NodeManager.setTransparency(this.element, Skip.DEEP);
DomHelper.makeUnselectable(this.element);
this.element.setAttribute("contentEditable", "false");
}
示例8: setCollapsed
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
public void setCollapsed(boolean collapsed) {
if (collapsed) {
self.setAttribute(COLLAPSED_ATTRIBUTE, COLLAPSED_VALUE);
// Webkit's incremental layout is incorrect, so we have to kick it a bit.
if (UserAgent.isWebkit()) {
self.getStyle().setDisplay(Display.INLINE_BLOCK);
// Force layout.
self.getOffsetParent();
// Revert to CSS display property (layed out correctly now).
self.getStyle().clearDisplay();
}
} else {
self.removeAttribute("c");
}
updatedCssClassNames();
}
示例9: createPanel
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
private Panel createPanel() {
Label label = new Label("Search Options");
label.addStyleName("search-header");
label.getElement().getStyle().setDisplay(Display.BLOCK);
Grid grid = new Grid(2,2);
grid.setText(0, 0, "Ontology/Codelist:");
grid.setWidget(0, 1, ontologiesDropBox);
grid.setText(1, 0, "Include Synonyms:");
grid.setWidget(1, 1, includeSynonyms);
grid.addStyleName("search-options");
CellFormatter cellFormatter = grid.getCellFormatter();
for(int i = 0; i < grid.getRowCount(); i++) {
cellFormatter.addStyleName(i, 0, "search-option");
}
Panel panel = new FlowPanel();
panel.add(label);
panel.add(grid);
return panel;
}
示例10: onStart
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
@Override
protected void onStart() {
VSliderPanel.this.contentNode.getStyle()
.setDisplay(Display.BLOCK);
if (VSliderPanel.this.componentSize == null || VSliderPanel.this.componentSize <= 0) {
if (VSliderPanel.this.mode.isVertical()) {
VSliderPanel.this.contentNode.getStyle()
.clearWidth();
if (VSliderPanel.this.contentNode.getFirstChildElement() != null) {
VSliderPanel.this.componentSize = VSliderPanel.this.contentNode.getFirstChildElement()
.getOffsetWidth();
}
}
else {
VSliderPanel.this.contentNode.getStyle()
.clearHeight();
if (VSliderPanel.this.contentNode.getFirstChildElement() != null) {
VSliderPanel.this.componentSize = VSliderPanel.this.contentNode.getFirstChildElement()
.getOffsetHeight();
}
}
}
}
示例11: showErrors
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
@Override
public void showErrors(List<EditorError> errors) {
StringBuilder buf = new StringBuilder();
for (EditorError error : errors) {
if (error.getEditor().equals(editProxy)) {
buf.append("\n");
if (error.getUserData() instanceof ParseException) {
buf.append(((ParseException) error.getUserData()).getMessage());
} else {
buf.append(error.getMessage());
}
}
}
if (0 < buf.length()) {
errorLabel.setInnerText(buf.substring(1));
errorLabel.getStyle().setDisplay(Display.BLOCK);
} else {
errorLabel.setInnerText("");
errorLabel.getStyle().setDisplay(Display.NONE);
}
}
示例12: renderUploader
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
private void renderUploader(ChangeInfo changeInfo, RevisionInfo revInfo) {
AccountInfo uploader = revInfo.uploader();
boolean isOwner = uploader == null || uploader._accountId() == changeInfo.owner()._accountId();
renderPushCertificate(revInfo, isOwner ? ownerPanel : uploaderPanel);
if (isOwner) {
uploaderRow.getStyle().setDisplay(Display.NONE);
return;
}
uploaderRow.getStyle().setDisplay(Display.TABLE_ROW);
if (uploader.avatar(AvatarInfo.DEFAULT_SIZE) != null) {
uploaderPanel.insert(new AvatarImage(uploader), 0);
}
String name = name(uploader);
uploaderName.setText(name);
uploaderName.setTitle(email(uploader, name));
}
示例13: render
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
@Override
public Widget render(Schema property) {
HTMLPanel panel = new HTMLPanel("");
panel.getElement().getStyle().setDisplay(Display.INLINE);
panel.add(new InlineLabel("\""));
if (property.locked()) {
InlineLabel label = new InlineLabel();
panel.add(label);
hasText = label;
} else {
TextArea editor = new TextArea();
panel.add(editor);
hasText = editor;
}
panel.add(new InlineLabel("\""));
if (property.getDefault() != null) {
hasText.setText(property.getDefault());
}
return panel;
}
示例14: changeViewPresentation
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
private void changeViewPresentation() {
if (dateShown && timeShown) {
right.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK);
datePicker.setDateAndTimeView();
right.getElement().removeClassName("time-select");
right.getElement().addClassName("date-select");
redecorate();
} else if (dateShown) {
right.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK);
datePicker.setDateView();
right.getElement().removeClassName("time-select");
right.getElement().addClassName("date-select");
redecorate();
} else if (timeShown) {
right.getElement().getStyle().setDisplay(Style.Display.INLINE_BLOCK);
datePicker.setTimeView();
right.getElement().removeClassName("date-select");
right.getElement().addClassName("time-select");
redecorate();
} else {
right.getElement().getStyle().setDisplay(Display.NONE);
redecorate();
}
}
示例15: createMapboxLogo
import com.google.gwt.dom.client.Style.Display; //導入依賴的package包/類
/**
* Create a MapBox logo.
*
* @return MapBox logo
*/
public static Control createMapboxLogo() {
ControlOptions controlOptions = new ControlOptions();
LinkElement mapboxLogo = Document.get().createLinkElement();
mapboxLogo.setHref("https://mapbox.com/about/maps");
mapboxLogo.setTarget("_blank");
mapboxLogo.getStyle().setPosition(Position.ABSOLUTE);
mapboxLogo.getStyle().setLeft(2, Unit.PX);
mapboxLogo.getStyle().setBottom(5, Unit.PX);
mapboxLogo.getStyle().setWidth(126, Unit.PX);
mapboxLogo.getStyle().setHeight(40, Unit.PX);
mapboxLogo.getStyle().setDisplay(Display.BLOCK);
mapboxLogo.getStyle().setOverflow(Overflow.HIDDEN);
mapboxLogo.getStyle().setBackgroundImage("url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAAoCAMAAAAFWtJHAAAAwFBMVEUAAAAAAAAAAABtbW0AAAAAAAAAAAAAAAAAAAAAAAClpaUAAADp6ekAAAD5+fna2toAAAAMDAzv7+/Nzc0AAAA2Njb8/Pz9/f3T09MAAAAAAAD7+/sAAAArKyuxsbH39/fs7OwbGxuIiIjz8/N8fHyenp7u7u74+PgAAAC8vLxWVlbx8fF1dXXl5eVcXFyUlJTQ0NDFxcVCQkLAwMC4uLj19fXo6OjW1tarq6ve3t77+/vi4uL6+vrKysrNzc3///8w7gSSAAAAP3RSTlMAOQNdPSYBPywKexLLGPCxNEHXnzFL+v2nGwf1IEiE6dBFad9jd9PuLo1V2mDDV3Cjl06SiuXIq4C3973ym6BQMVUPAAAEXElEQVR4Ae2WCVP6OBiH05L0l1IqrVbkKHJ54I0oHn+PfP9vtUle0z/YdhbH2XVnd58ZnRJIeHiPJOx//mH4vQSAN+8FjAhFxgHIaPvJeZ99hxwEElon5iAQbj85Y98g8ODwjEOMAvGFyeE3FEKgodTBqj0BJGN9DhyNd5Ta3ean9QEopfaA+LsKhnEKRExqg4FSP6Og7oEkAjBWnxSCgBX4xF+kcLoPcOBQrSv0e5kH7s1j37jECQieCTPiFGxL5VHw2zQWCeeJiPt6kjRQw0XSkIdVChf67xGa4alSnZlT6HEQ8CK9ANbhvXUF9xlDkBfTuHDWScgC9+z5FQpPI12TlwC6+sV7ixR8CUMKiwjm2GQeOQWHMGuHGdbnObJAwCEqFJpNU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vID9nENm+yxk/xb+AGAjNfRZuk9qAAAAAElFTkSuQmCC)");
controlOptions.setElement(mapboxLogo);
return new Control(controlOptions);
}