List of usage examples for com.google.gwt.dom.client Style setColor
public void setColor(String value)
From source file:ilarkesto.gwt.client.desktop.fields.FieldEditorDialogBox.java
License:Open Source License
private Label createErrorLabel() { Label label = new Label(); Style style = label.getElement().getStyle(); style.setDisplay(Display.NONE);//from www . j a v a 2 s. c o m style.setColor("#cc0000"); style.setMarginTop(Widgets.defaultSpacing, Unit.PX); style.setMarginBottom(Widgets.defaultSpacing, Unit.PX); return label; }
From source file:ilarkesto.gwt.client.desktop.Widgets.java
License:Open Source License
public static Widget notification(Object object) { if (object == null) return null; Label label = new Label(Str.format(object)); Style style = label.getElement().getStyle(); style.setColor(Colors.googlePurple); style.setFontWeight(FontWeight.BOLD); return new BuilderPanel().setStyleCard().addColorMarker(Colors.googleRed).addWithPadding(label).asWidget(); }
From source file:ilarkesto.gwt.client.desktop.Widgets.java
License:Open Source License
public static Label textTitleInverted(Object object) { if (object == null) return null; Label label = new Label(Str.format(object)); Style style = label.getElement().getStyle(); style.setFontWeight(FontWeight.BOLD); style.setFontSize(105, Unit.PCT);/*www .j a v a 2 s .co m*/ style.setBackgroundColor(Colors.googleBlue); style.setColor("white"); return label; }
From source file:ilarkesto.gwt.client.desktop.Widgets.java
License:Open Source License
public static Label textTitle(Object object) { if (object == null) return null; Label label = new Label(Str.format(object)); Style style = label.getElement().getStyle(); style.setFontWeight(FontWeight.BOLD); style.setFontSize(105, Unit.PCT);//from w w w. j a v a2 s . c o m style.setColor("#666"); return label; }
From source file:info.magnolia.ui.vaadin.gwt.client.applauncher.widget.AppTileWidget.java
License:Open Source License
/** * Set colors with the group coloring./* ww w.j a va 2 s. c o m*/ */ private void setColors(boolean isTileWhite) { final Style style = getElement().getStyle(); if (isTileWhite) { style.setColor(getParent().getColor()); style.setBackgroundColor("white"); } else { style.setBackgroundColor(getParent().getColor()); style.setColor("white"); } }
From source file:info.magnolia.ui.vaadin.gwt.client.applauncher.widget.VTemporaryAppGroupBarTile.java
License:Open Source License
private void setColorsClick() { final Style style = getElement().getStyle(); if (!group.isClientGroup()) { style.setColor(group.getColor()); style.setBorderColor("white"); } else {//w ww . j av a2s.c o m style.setBorderColor(group.getColor()); style.setColor("white"); } }
From source file:jake2.gwt.client.GwtQuake.java
License:Open Source License
public void onModuleLoad() { // Initialize drivers. Document doc = Document.get(); doc.setTitle("GWT Quake II"); BodyElement body = doc.getBody();//from w w w.j a v a 2 s. c om Style style = body.getStyle(); style.setPadding(0, Unit.PX); style.setMargin(0, Unit.PX); style.setBorderWidth(0, Unit.PX); style.setProperty("height", "100%"); style.setBackgroundColor("#000"); style.setColor("#888"); boolean wireframe = ("" + Window.Location.getHash()).indexOf("wireframe") != -1; canvas = (CanvasElement) doc.createElement("canvas"); video = doc.createElement("video"); w = Window.getClientWidth(); h = Window.getClientHeight(); canvas.setWidth(w); canvas.setHeight(h); style = canvas.getStyle(); style.setProperty("height", "100%"); style.setProperty("width", "100%"); style = video.getStyle(); style.setProperty("height", "100%"); style.setProperty("width", "100%"); style.setProperty("display", "none"); body.appendChild(canvas); body.appendChild(video); try { final refexport_t renderer = wireframe ? new GwtWireframeGLRenderer(canvas) : new GwtWebGLRenderer(canvas, video); Globals.re = renderer; ResourceLoader.impl = new GwtResourceLoaderImpl(); Compatibility.impl = new CompatibilityImpl(); S.impl = new GwtSound(); NET.socketFactory = new WebSocketFactoryImpl(); // Sys.impl = new Sys.SysImpl() { // public void exit(int status) { // Window.alert("Something's rotten in Denmark"); // Window.Location.assign("gameover.html"); // } // }; // Flags. Qcommon.Init(new String[] { "GQuake" }); // Enable stdout. Globals.nostdout = Cvar.Get("nostdout", "0", 0); Window.addResizeHandler(new ResizeHandler() { public void onResize(ResizeEvent event) { if (Window.getClientWidth() == w && Window.getClientHeight() == h) { return; } w = Window.getClientWidth(); h = Window.getClientHeight(); renderer.GLimp_SetMode(new Dimension(w, h), 0, false); } }); // QuakeServer.main(new String[0], new DummySNetImpl(), false); timer = new Timer() { double startTime = Duration.currentTimeMillis(); @Override public void run() { try { double curTime = Duration.currentTimeMillis(); boolean pumping = ResourceLoader.Pump(); if (pumping) { SCR.UpdateScreen2(); } else { int dt = (int) (curTime - startTime); GwtKBD.Frame(dt); Qcommon.Frame(dt); } startTime = curTime; timer.schedule(ResourceLoader.Pump() ? LOADING_DELAY : INTER_FRAME_DELAY); } catch (Exception e) { Compatibility.printStackTrace(e); } } }; timer.schedule(INTER_FRAME_DELAY); } catch (Exception e) { Compatibility.printStackTrace(e); body.setInnerHTML(NO_WEBGL_MESSAGE); } }
From source file:jetbrains.jetpad.projectional.domUtil.DomTextEditor.java
License:Apache License
private void updateCaretAndSelection() { Style caretStyle = myCaretDiv.getStyle(); updateCaretPosition();// ww w.j av a2s . c o m caretStyle.setTop(0, Style.Unit.PX); caretStyle.setWidth(1, Style.Unit.PX); caretStyle.setHeight(getLineHeight(), Style.Unit.PX); caretStyle.setBackgroundColor("black"); Style selectionStyle = mySelectionDiv.getStyle(); selectionStyle.setTop(0, Style.Unit.PX); selectionStyle.setHeight(getLineHeight(), Style.Unit.PX); selectionStyle.setBackgroundColor("Highlight"); selectionStyle.setColor("HighlightText"); updateSelectionBoundsAndText(); }
From source file:net.sf.mmm.client.ui.gwt.widgets.richtext.FeatureBehaviorFontColor.java
License:Apache License
/** * {@inheritDoc}//from w w w. j a va 2 s . c o m */ @Override protected void applyFontSettings(Color value, Style style) { style.setColor(value.toString()); }
From source file:org.clevermore.monitor.client.AbstractEntryPoint.java
License:Apache License
private void alertButtonClicked(String attribute, int timeLeft) { Style style = alertImg.getElement().getStyle(); if ("1".equals(attribute)) { alertImg.getElement().setAttribute("state", "2"); style.setColor("red"); style.setFontWeight(FontWeight.BOLDER); alertImg.setTitle("Continue Alerts, time left for auto-enable: " + timeLeft + " min."); alertImg.setResource(resources.continueAlerts()); } else {//from ww w .j av a2 s .co m alertImg.getElement().setAttribute("state", "1"); style.setColor("black"); style.setFontWeight(FontWeight.NORMAL); alertImg.setTitle("Stop Alerts"); alertImg.setResource(resources.stopAlerts()); } }