コード例 #1
0
 /**
  * Return the font.
  *
  * @return the font
  */
 public SFont getSelectionFont() {
   return dynamicStyles == null || dynamicStyles.get(SELECTOR_SELECTION) == null
       ? null
       : CSSStyleSheet.getFont((CSSAttributeSet) dynamicStyles.get(SELECTOR_SELECTION));
 }
コード例 #2
0
 /**
  * Set the font.
  *
  * @param font the new font
  */
 public void setSelectionFont(SFont font) {
   setAttributes(SELECTOR_SELECTION, CSSStyleSheet.getAttributes(font));
 }
コード例 #3
0
 /**
  * Return the foreground color.
  *
  * @return the foreground color
  */
 public Color getSelectionForeground() {
   return dynamicStyles == null || dynamicStyles.get(SELECTOR_SELECTION) == null
       ? null
       : CSSStyleSheet.getForeground((CSSAttributeSet) dynamicStyles.get(SELECTOR_SELECTION));
 }
コード例 #4
0
 /**
  * Set the foreground color.
  *
  * @param color the new foreground color
  */
 public void setSelectionForeground(Color color) {
   setAttribute(SELECTOR_SELECTION, CSSProperty.COLOR, CSSStyleSheet.getAttribute(color));
 }
コード例 #5
0
 /**
  * Set the foreground color.
  *
  * @param color the new foreground color
  */
 public void setSelectionBackground(Color color) {
   setAttribute(
       SELECTOR_SELECTION, CSSProperty.BACKGROUND_COLOR, CSSStyleSheet.getAttribute(color));
 }