Exemple #1
0
 private void fontSizeNumberInputConfim() {
   String comboText = combo_font_size.getText();
   if (StyleCommonPropertyValue.matchesNumber(comboText)) {
     int num = Integer.valueOf(comboText);
     if (!combo_font_sizeUnit.getEnabled()) {
       combo_font_sizeUnit.setEnabled(true);
     }
     slider_font_size.setSelection(StyleCommonPropertyValue.SLIDER_SUBTRACTION_VALUE - num);
     String fontSizeValue =
         comboText + combo_font_sizeUnit.getItem(combo_font_sizeUnit.getSelectionIndex());
     styleDialog.setPropertyValue(pageName, "font-size", fontSizeValue);
     styleDialog.rePaintText("font-size", fontSizeValue, true);
   }
 }
Exemple #2
0
 /** 设置text-decoration系列属性 */
 private void setTextDecoration(boolean painFlag) {
   StringBuffer sf = new StringBuffer();
   sf.append(underline);
   if (!"".equals(underline)) {
     sf.append(" ");
   }
   sf.append(overline);
   if (!"".equals(overline)) {
     sf.append(" ");
   }
   sf.append(line_through);
   if (!"".equals(line_through)) {
     sf.append(" ");
   }
   sf.append(blink);
   if (!"".equals(blink)) {
     sf.append(" ");
   }
   sf.append(none);
   styleDialog.setPropertyValue(pageName, "text-decoration", sf.toString());
   styleDialog.rePaintText("text-decoration", sf.toString(), painFlag);
 }