JavaTM 2 Platform
Standard Ed. 5.0

javax.swing.plaf.synth
Ŭ·¡½º ColorType

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.swing.plaf.synth.ColorType

public class ColorType
extends Object

½ºÅ¸ÀϷκÎÅÍ ²¨³¾ ¼ö Àִ ŸÀÔ º¸ÁõµÈ »öÀÇ ¿­°ÅÀÔ´Ï´Ù.

°¢ SynthStyle¿¡´Â SynthStyle.getColor(SynthContext, ColorType) ¸Þ¼­µå¸¦ °³ÀÔ½ÃÄÑ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â 1 Á¶ÀÇ ColorType°¡ ÀÖ½À´Ï´Ù. SynthStyle installDefaults´Â FOREGROUND Ä÷¯¸¦ ÄÄÆÛ³ÍÆ®ÀÇ foreground·Î¼­ ÀνºÅç ÇØ, BACKGROUND Ä÷¯¸¦ ÄÄÆÛ³ÍÆ®ÀÇ ¹é±×¶ó¿îµå·Î¼­ ÀνºÅç ÇÕ´Ï´Ù (foreground Ä÷¯³ª ¹é±×¶ó¿îµå Ä÷¯¸¦ ¸í½ÃÀûÀ¸·Î ÁöÁ¤ÇÏÁö ¾Ê´Â °æ¿ì). ÄÄÆÛ³ÍÆ®¾È¿¡´Â ¶ÇÇÑ ¸î°³ÀÇ »ö¿¡ ±Ù°ÅÇÏ´Â ÇÁ·ÎÆÛƼ¸¦ Áö¿ø ÇÏ°í ÀÖ´Â °Íµµ ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î, JList¿¡´Â SynthConstants.SELECTED ÄÄÆÛ³ÍÆ® »óÅ¿¡ ¸ÂÃß¾î FOREGROUND¿¡ ¸Ê µÇ´Â selectionForeground ÇÁ·ÎÆÛƼ°¡ ÀÖ½À´Ï´Ù.

´ÙÀ½ÀÇ ¿¹´Â DISABLED »óÅÂÀÇ °æ¿ì´Â ºÓÀº »öÀ» µ¹·ÁÁÖ°í, ±× ¿ÜÀÇ °æ¿ì´Â °ËÀº »öÀ» µ¹·ÁÁÖ´Â Ä¿½ºÅÒÀÇ SynthStyle¸¦ ³ªÅ¸³»°í ÀÖ½À´Ï´Ù.


 class MyStyle extends SynthStyle {
     private Color disabledColor = new ColorUIResource(Color.RED);
     private Color color = new ColorUIResource(Color.BLACK);
     protected Color getColorForState(SynthContext context, ColorType type){
         if (context.getComponentState() == SynthConstants.DISABLED) {
             return disabledColor;
         }
         return color;
     }
 }
 

µµÀÔµÈ ¹öÀü :
1.5

ÇÊµå °³¿ä
static ColorType BACKGROUND
          ¿µ¿ªÀÇ ¹é±×¶ó¿îµå¿ëÀÇ ColorType ÀÔ´Ï´Ù.
static ColorType FOCUS
          Æ÷Ä¿½º¿ëÀÇ ColorType ÀÔ´Ï´Ù.
static ColorType FOREGROUND
          ¿µ¿ªÀÇ foreground¿ëÀÇ ColorType ÀÔ´Ï´Ù.
static int MAX_COUNT
          ColorType ÃÖ´ë¼öÀÔ´Ï´Ù.
static ColorType TEXT_BACKGROUND
          ¿µ¿ªÀÇ ¹é±×¶ó¿îµå¿ëÀÇ ColorType ÀÔ´Ï´Ù.
static ColorType TEXT_FOREGROUND
          ¿µ¿ªÀÇ foreground¿ëÀÇ ColorType ÀÔ´Ï´Ù.
 
»ý¼ºÀÚ °³¿ä
protected ColorType (String  description)
          ÁöÁ¤µÈ ¼³¸íÀ» »ç¿ëÇØ »õ·Î¿î ColorType¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 int getID ()
          ÀÌ ColorType ÀÏÀÇÀÇ ID¸¦ Á¤¼ö°ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.
 String toString ()
          ÀÌ ColorType ÅؽºÆ® Çü½ÄÀÇ ¼³¸íÀ» ¸®ÅÏÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

ÇʵåÀÇ »ó¼¼

FOREGROUND

public static final ColorType  FOREGROUND
¿µ¿ªÀÇ foreground¿ëÀÇ ColorType ÀÔ´Ï´Ù.


BACKGROUND

public static final ColorType  BACKGROUND
¿µ¿ªÀÇ ¹é±×¶ó¿îµå¿ëÀÇ ColorType ÀÔ´Ï´Ù.


TEXT_FOREGROUND

public static final ColorType  TEXT_FOREGROUND
¿µ¿ªÀÇ foreground¿ëÀÇ ColorType ÀÔ´Ï´Ù.


TEXT_BACKGROUND

public static final ColorType  TEXT_BACKGROUND
¿µ¿ªÀÇ ¹é±×¶ó¿îµå¿ëÀÇ ColorType ÀÔ´Ï´Ù.


FOCUS

public static final ColorType  FOCUS
Æ÷Ä¿½º¿ëÀÇ ColorType ÀÔ´Ï´Ù.


MAX_COUNT

public static final int MAX_COUNT
ColorType ÃÖ´ë¼öÀÔ´Ï´Ù.

»ý¼ºÀÚ »ó¼¼

ColorType

protected ColorType(String  description)
ÁöÁ¤µÈ ¼³¸íÀ» »ç¿ëÇØ »õ·Î¿î ColorType¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
description - ColorType ¼³¸íÀ» ³ªÅ¸³»´Â String
¸Þ¼­µåÀÇ »ó¼¼

getID

public final int getID()
ÀÌ ColorType ÀÏÀÇÀÇ ID¸¦ Á¤¼ö°ªÀ¸·Î ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
ÀÌ ColorType ÀÏÀÇÀÇ ID (Á¤¼ö°ª )

toString

public String  toString()
ÀÌ ColorType ÅؽºÆ® Çü½ÄÀÇ ¼³¸íÀ» ¸®ÅÏÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ toString
¹Ýȯ°ª:
ÀÌ Ä³¸¯ÅÍ ¶óÀÎÀÇ ¼³¸í

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.