Updates the font in the preview component according to the selected values.
173033
private void updateComponents() {
        updatingComponents = true;

        Font font = getFont();

        fontList.setSelectedValue(font.getName(), true);
        sizeList.setSelectedValue(font.getSize(), true);
        boldCheckBox.setSelected(font.isBold());
        italicCheckBox.setSelected(font.isItalic());

        if (previewText == null) {
            previewLabel.setText(font.getName());
        }

        // set the font and fire a property change
        Font oldValue = previewLabel.getFont();
        previewLabel.setFont(font);
        firePropertyChange("font", oldValue, font);

        updatingComponents = false;
    }
993461
def _update_preview(self):
        """"""
        color = self.hexa.get()
        if self.alpha_channel:
            prev = overlay(self._transparent_bg, hexa_to_rgb(color))
            self._im_color = ImageTk.PhotoImage(prev, master=self)
            self.color_preview.configure(image=self._im_color)
        else:
            self.color_preview.configure(background=color)
280988
private void updateDecoration() {
        if (lastResult != null) {
            if (lastResult) {
                setIcon(validIcon);
                setToolTipText(validText);
            } else {
                setIcon(invalidIcon);
                setToolTipText(invalidText);
            }
        }
    }
346999
function update (src) {
      if (element.styleSheet) {
        element.styleSheet.cssText = src
      } else {
        element.textContent = src
      }
    }
546785
function(value) {
			if (Lang.isNumber(value)) {
				value += 'px';
			}
			this.setStyle(HEIGHT,value);
			this._fixEdges();
			this.redraw();
		}
1058434
def OnCellFont(self, event):
        """"""

        with undo.group(_("Font")):
            self.grid.actions.set_attr("textfont", event.font)

        self.grid.ForceRefresh()

        self.grid.update_attribute_toolbar()

        event.Skip()
802508
public void changeFont(boolean bDescription)
    {
        if (m_fontNormal == null)
        {
            m_fontNormal = this.getFont();
            m_fontDesc = m_fontNormal.deriveFont(Font.ITALIC);
            m_colorNormal = this.getForeground();
            m_colorDesc = Color.gray;
        }
        if (bDescription)
        {
            this.setFont(m_fontDesc);
            this.setForeground(m_colorDesc);
        }
        else
        {
            this.setFont(m_fontNormal);
            this.setForeground(m_colorNormal);
        }
    }
173462
def updateFontPicker(self):
        
        font = self.currentFont()
        self._fontPickerWidget.setPointSize(font.pointSize())
        self._fontPickerWidget.setCurrentFamily(font.family())
520192
private void updateFontButton(@Nonnull final JButton button, @Nonnull final Font font) {
    final String strStyle;
    if (font.isBold()) {
      strStyle = font.isItalic() ? "bolditalic" : "bold"; //NOI18N
    } else {
      strStyle = font.isItalic() ? "italic" : "plain"; //NOI18N
    }

    button.setText(font.getName() + ", " + strStyle + ", " + font.getSize()); //NOI18N
  }
492733
private void updateRender() {
		if (inherit.isSelected())
		{
			emitter.usePoints = Particle.INHERIT_POINTS;
			oriented.setEnabled( true );
		}
		if (quads.isSelected())
		{
			emitter.usePoints = Particle.USE_QUADS;
			oriented.setEnabled( true );
		}
		if (points.isSelected())
		{
			emitter.usePoints = Particle.USE_POINTS;
			oriented.setEnabled( false );
			oriented.setSelected( false );
		}
		
		// oriented
		if( oriented.isSelected())
			emitter.useOriented= true;
		else
			emitter.useOriented= false;
		
		// additive blending
		if( additive.isSelected())
			emitter.useAdditive= true;
		else
			emitter.useAdditive= false;
	}
902537
private void  updateStyle(RendererState state, Style style)
   {
      // Now update each style property we know about
      if (isSpecified(style, SVG.SPECIFIED_COLOR))
      {
         state.style.color = style.color;
      }

      if (isSpecified(style, SVG.SPECIFIED_OPACITY))
      {
         state.style.opacity = style.opacity;
      }

      if (isSpecified(style, SVG.SPECIFIED_FILL))
      {
         state.style.fill = style.fill;
         state.hasFill = (style.fill != null && style.fill != Colour.TRANSPARENT);
      }

      if (isSpecified(style, SVG.SPECIFIED_FILL_OPACITY))
      {
         state.style.fillOpacity = style.fillOpacity;
      }

      // If either fill or its opacity has changed, update the fillPaint
      if (isSpecified(style, SVG.SPECIFIED_FILL | SVG.SPECIFIED_FILL_OPACITY | SVG.SPECIFIED_COLOR | SVG.SPECIFIED_OPACITY))
      {
         setPaintColour(state, true, state.style.fill);
      }

      if (isSpecified(style, SVG.SPECIFIED_FILL_RULE))
      {
         state.style.fillRule = style.fillRule;
      }


      if (isSpecified(style, SVG.SPECIFIED_STROKE))
      {
         state.style.stroke = style.stroke;
         state.hasStroke = (style.stroke != null && style.stroke != Colour.TRANSPARENT);
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_OPACITY))
      {
         state.style.strokeOpacity = style.strokeOpacity;
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE | SVG.SPECIFIED_STROKE_OPACITY | SVG.SPECIFIED_COLOR | SVG.SPECIFIED_OPACITY))
      {
         setPaintColour(state, false, state.style.stroke);
      }

      if (isSpecified(style, SVG.SPECIFIED_VECTOR_EFFECT))
      {
         state.style.vectorEffect = style.vectorEffect;
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_WIDTH))
      {
         state.style.strokeWidth = style.strokeWidth;
         state.strokePaint.setStrokeWidth(state.style.strokeWidth.floatValue(this));
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_LINECAP))
      {
         state.style.strokeLineCap = style.strokeLineCap;
         switch (style.strokeLineCap)
         {
            case Butt:
               state.strokePaint.setStrokeCap(Paint.Cap.BUTT);
               break;
            case Round:
               state.strokePaint.setStrokeCap(Paint.Cap.ROUND);
               break;
            case Square:
               state.strokePaint.setStrokeCap(Paint.Cap.SQUARE);
               break;
            default:
               break;
         }
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_LINEJOIN))
      {
         state.style.strokeLineJoin = style.strokeLineJoin;
         switch (style.strokeLineJoin)
         {
            case Miter:
               state.strokePaint.setStrokeJoin(Paint.Join.MITER);
               break;
            case Round:
               state.strokePaint.setStrokeJoin(Paint.Join.ROUND);
               break;
            case Bevel:
               state.strokePaint.setStrokeJoin(Paint.Join.BEVEL);
               break;
            default:
               break;
         }
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_MITERLIMIT))
      {
         // FIXME: must be >= 0
         state.style.strokeMiterLimit = style.strokeMiterLimit;
         state.strokePaint.setStrokeMiter(style.strokeMiterLimit);
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_DASHARRAY))
      {
         state.style.strokeDashArray = style.strokeDashArray;
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_DASHOFFSET))
      {
         state.style.strokeDashOffset = style.strokeDashOffset;
      }

      if (isSpecified(style, SVG.SPECIFIED_STROKE_DASHARRAY | SVG.SPECIFIED_STROKE_DASHOFFSET))
      {
         // Either the dash array or dash offset has changed.
         if (state.style.strokeDashArray == null)
         {
            state.strokePaint.setPathEffect(null);
         }
         else
         {
            float  intervalSum = 0f;
            int    n = state.style.strokeDashArray.length;
            // SVG dash arrays can be odd length, whereas Android dash arrays must have an even length.
            // So we solve the problem by doubling the array length.
            int    arrayLen = (n % 2==0) ? n : n*2;
            float[] intervals = new float[arrayLen];
            for (int i=0; i<arrayLen; i++) {
               intervals[i] = state.style.strokeDashArray[i % n].floatValue(this);
               intervalSum += intervals[i];
            }
            if (intervalSum == 0f) {
               state.strokePaint.setPathEffect(null);
            } else {
               float offset = state.style.strokeDashOffset.floatValue(this);
               if (offset < 0) {
                  // SVG offsets can be negative. Not sure if Android ones can be.
                  // Just in case we will convert it.
                  offset = intervalSum + (offset % intervalSum);
               }
               state.strokePaint.setPathEffect( new DashPathEffect(intervals, offset) );
            }
         }
      }

      if (isSpecified(style, SVG.SPECIFIED_FONT_SIZE))
      {
         float  currentFontSize = getCurrentFontSize();
         state.style.fontSize = style.fontSize;
         state.fillPaint.setTextSize(style.fontSize.floatValue(this, currentFontSize));
         state.strokePaint.setTextSize(style.fontSize.floatValue(this, currentFontSize));
      }

      if (isSpecified(style, SVG.SPECIFIED_FONT_FAMILY))
      {
         state.style.fontFamily = style.fontFamily;
      }

      if (isSpecified(style, SVG.SPECIFIED_FONT_WEIGHT))
      {
         // Font weights are 100,200...900
         if (style.fontWeight == Style.FONT_WEIGHT_LIGHTER && state.style.fontWeight > 100)
            state.style.fontWeight -= 100;
         else if (style.fontWeight == Style.FONT_WEIGHT_BOLDER && state.style.fontWeight < 900)
            state.style.fontWeight += 100;
         else
            state.style.fontWeight = style.fontWeight;
      }

      if (isSpecified(style, SVG.SPECIFIED_FONT_STYLE))
      {
         state.style.fontStyle = style.fontStyle;
      }

      // If typeface, weight or style has changed, update the paint typeface
      if (isSpecified(style, SVG.SPECIFIED_FONT_FAMILY | SVG.SPECIFIED_FONT_WEIGHT | SVG.SPECIFIED_FONT_STYLE))
      {
         Typeface  font = null;

         if (state.style.fontFamily != null && document != null) {
            SVGExternalFileResolver  fileResolver = SVG.getFileResolver();

            for (String fontName: state.style.fontFamily) {
               font = checkGenericFont(fontName, state.style.fontWeight, state.style.fontStyle);
               if (font == null && fileResolver != null) {
                  font = fileResolver.resolveFont(fontName, state.style.fontWeight, String.valueOf(state.style.fontStyle));
               }
               if (font != null)
                  break;
            }
         }
         if (font == null) {
            // Fall back to default font
            font = checkGenericFont(DEFAULT_FONT_FAMILY, state.style.fontWeight, state.style.fontStyle);
         }
         state.fillPaint.setTypeface(font);
         state.strokePaint.setTypeface(font);
      }

      if (isSpecified(style, SVG.SPECIFIED_TEXT_DECORATION))
      {
         state.style.textDecoration = style.textDecoration;
         state.fillPaint.setStrikeThruText(style.textDecoration == TextDecoration.LineThrough);
         state.fillPaint.setUnderlineText(style.textDecoration == TextDecoration.Underline);
         // There is a bug in Android <= JELLY_BEAN (16) that causes stroked underlines to
         // not be drawn properly. See bug (39511). This has been fixed in JELLY_BEAN_MR1 (4.2)
         if (android.os.Build.VERSION.SDK_INT >= 17) {
            state.strokePaint.setStrikeThruText(style.textDecoration == TextDecoration.LineThrough);
            state.strokePaint.setUnderlineText(style.textDecoration == TextDecoration.Underline);
         }
      }

      if (isSpecified(style, SVG.SPECIFIED_DIRECTION))
      {
         state.style.direction = style.direction;
      }

      if (isSpecified(style, SVG.SPECIFIED_TEXT_ANCHOR))
      {
         state.style.textAnchor = style.textAnchor;
      }

      if (isSpecified(style, SVG.SPECIFIED_OVERFLOW))
      {
         state.style.overflow = style.overflow;
      }

      if (isSpecified(style, SVG.SPECIFIED_MARKER_START))
      {
         state.style.markerStart = style.markerStart;
      }

      if (isSpecified(style, SVG.SPECIFIED_MARKER_MID))
      {
         state.style.markerMid = style.markerMid;
      }

      if (isSpecified(style, SVG.SPECIFIED_MARKER_END))
      {
         state.style.markerEnd = style.markerEnd;
      }

      if (isSpecified(style, SVG.SPECIFIED_DISPLAY))
      {
         state.style.display = style.display;
      }

      if (isSpecified(style, SVG.SPECIFIED_VISIBILITY))
      {
         state.style.visibility = style.visibility;
      }

      if (isSpecified(style, SVG.SPECIFIED_CLIP))
      {
         state.style.clip = style.clip;
      }

      if (isSpecified(style, SVG.SPECIFIED_CLIP_PATH))
      {
         state.style.clipPath = style.clipPath;
      }

      if (isSpecified(style, SVG.SPECIFIED_CLIP_RULE))
      {
         state.style.clipRule = style.clipRule;
      }

      if (isSpecified(style, SVG.SPECIFIED_MASK))
      {
         state.style.mask = style.mask;
      }

      if (isSpecified(style, SVG.SPECIFIED_STOP_COLOR))
      {
         state.style.stopColor = style.stopColor;
      }

      if (isSpecified(style, SVG.SPECIFIED_STOP_OPACITY))
      {
         state.style.stopOpacity = style.stopOpacity;
      }

      if (isSpecified(style, SVG.SPECIFIED_VIEWPORT_FILL))
      {
         state.style.viewportFill = style.viewportFill;
      }

      if (isSpecified(style, SVG.SPECIFIED_VIEWPORT_FILL_OPACITY))
      {
         state.style.viewportFillOpacity = style.viewportFillOpacity;
      }

      if (isSpecified(style, SVG.SPECIFIED_IMAGE_RENDERING))
      {
         state.style.imageRendering = style.imageRendering;
      }
   }
1177288
public void setFont(Font font) {
		if (comboBox != null) {
			comboBox.setFont(font);
		}
		super.setFont(font);
	}
1175797
function updatePreview (editor, converter) {
    var preview = $('.rendered-markdown');
    //May want to update TOC here too
    toc.generateHeaders(editor);
    preview.html (converter.makeHtml (addSpaces(editor.getValue ())));
    updateWordCount (editor);

  }
585231
private void initLocales(CmsPreviewInfo previewInfo) {

        if (m_localeSelect != null) {
            removeButton(m_localeSelect);
            m_localeSelect = null;
        }
        if (previewInfo.hasAdditionalLocales()) {
            m_localeSelect = new CmsSelectBox(previewInfo.getLocales());
            m_localeSelect.setFormValueAsString(previewInfo.getLocale());
            m_localeSelect.addValueChangeHandler(new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {

                    loadOtherLocale(event.getValue());
                }
            });
            Style style = m_localeSelect.getElement().getStyle();
            style.setWidth(SELECTBOX_WIDTH, Unit.PX);
            style.setFloat(com.google.gwt.dom.client.Style.Float.LEFT);
            style.setMargin(0, Unit.PX);
            m_localeSelect.truncate(TRUNCATION_PREFIX, SELECTBOX_WIDTH - 20);
            addButton(m_localeSelect);

        }
    }
1194408
def update_font(self):
        """"""
        font = self.get_plugin_font()
        for client in self.clients:
            client.set_font(font)
1128487
public void updateGraphics(Graphics2D g)
    {
        g.setFont(font);
        g.setColor(color);
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    }
1064313
function(value, sendUpdatedEvt) {
	   this.el.value = value;
		
		if(this.oButton) {
			this.oButton.set("value", value);
			var el = Dom.get(this.labelElId);
			if(el) {
				Dom.setStyle(el, "backgroundColor", value);
				el.innerHTML = "Current color is " + value;
			}
			else {
				Event.onAvailable(this.labelElId, function() {
					Dom.setStyle(this, "backgroundColor", value);
					this.innerHTML = "Current color is " + value;
				});
			}
		}
	
		if(this.oColorPicker) {
			this.oColorPicker.set("hex", value.substr(1));
		}

		// Call Field.setValue to set class and fire updated event
		inputEx.ColorPickerField.superclass.setValue.call(this,value, sendUpdatedEvt);
	}