ÁÖÁ¦

org.eclipse.ui.themes

ÀÌ È®ÀåÁ¡Àº UI ¸ð¾çÀ» »ç¿ëÀÚ Á¤ÀÇÇÏ´Â µ¥ »ç¿ëµË´Ï´Ù. »ö»ó ¹× ±Û²Ã ¿£Æ¼Æ¼»Ó¸¸ ¾Æ´Ï¶ó ÁÖÁ¦ ¿£Æ¼Æ¼µµ Á¤ÀÇÇÒ ¼ö ÀÖ½À´Ï´Ù. ÁÖÁ¦¸¦ »ç¿ëÇϸé ÀÀ¿ëÇÁ·Î±×·¥¿¡¼­ ƯÁ¤ »ç¿ë¿¡ ¸Â´Â ±âº» »ö»ó ¹× ±Û²Ã ½ºÆåÀ» ¼±ÅÃÀûÀ¸·Î ´ëüÇÒ ¼ö ÀÖ½À´Ï´Ù.

<!ELEMENT extension (theme* , colorDefinition* , fontDefinition* , themeElementCategory* , data* , categoryPresentationBinding*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT theme (colorOverride* , fontOverride* , description? , data*)>

<!ATTLIST theme

id   CDATA #REQUIRED

name CDATA #REQUIRED>

±Û²Ã, »ö»ó ¹× µ¥ÀÌÅÍ ´ëü ÄÝ·º¼Ç. ÀÌ·¯ÇÑ ÄÝ·º¼ÇÀº WorkbenchÀÇ ¸ð¾çÀ» º¯°æÇÏ´Â µ¥ »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù.



<!ELEMENT themeElementCategory (description)>

<!ATTLIST themeElementCategory

id       CDATA #REQUIRED

parentId CDATA #IMPLIED

class    CDATA #IMPLIED

label    CDATA #IMPLIED>

ÁÖÁ¦ ¿ä¼Ò Á¤ÀÇÀÇ ³í¸® ±×·ì. ÀÌ Ä«Å×°í¸®´Â »ö»ó ¹× ±Û²ÃÀ» Æ÷ÇÔÇÒ ¼ö ÀÖ½À´Ï´Ù.



<!ELEMENT colorDefinition (colorFactory? , colorValue* , description?)>

<!ATTLIST colorDefinition

id           CDATA #IMPLIED

label        CDATA #REQUIRED

defaultsTo   CDATA #IMPLIED

value        CDATA #IMPLIED

categoryId   CDATA #IMPLIED

colorFactory CDATA #IMPLIED

isEditable   (true | false) >

±âÈ£ »ö»ó Á¤ÀÇ



<!ELEMENT fontDefinition (fontValue* , description?)>

<!ATTLIST fontDefinition

id         CDATA #REQUIRED

label      CDATA #REQUIRED

value      CDATA #IMPLIED

categoryId CDATA #IMPLIED

defaultsTo CDATA #IMPLIED

isEditable (true | false) >

±âÈ£ ±Û²Ã Á¤ÀÇ



<!ELEMENT colorOverride (colorFactory? , colorValue*)>

<!ATTLIST colorOverride

id           CDATA #REQUIRED

value        CDATA #IMPLIED

colorFactory CDATA #IMPLIED>

colorDefinition ¿ä¼Ò¿¡ Á¤ÀÇµÈ »ö»ó ´ëü¸¦ Çã¿ëÇÕ´Ï´Ù. ÀÌ·¯ÇÑ »ö»óÀº ÁÖÁ¦°¡ »ç¿ë ÁßÀÏ ¶§ Àû¿ëµË´Ï´Ù.



<!ELEMENT fontOverride (fontValue*)>

<!ATTLIST fontOverride

id    CDATA #REQUIRED

value CDATA #REQUIRED>

fontsDefinition ¿ä¼Ò¿¡ Á¤ÀÇµÈ ±Û²Ã ´ëü¸¦ Çã¿ëÇÕ´Ï´Ù. ÀÌ·¯ÇÑ ±Û²ÃÀº ÁÖÁ¦°¡ »ç¿ë ÁßÀÏ ¶§ Àû¿ëµË´Ï´Ù.



<!ELEMENT description (#CDATA)>

¿ä¼Ò »ç¿ë¿¡ ´ëÇÑ °£´ÜÇÑ ¼³¸í



<!ELEMENT colorFactory (parameter*)>

<!ATTLIST colorFactory

class  CDATA #REQUIRED

plugin CDATA #IMPLIED>

colorFactory ¼Ó¼ºÀÇ ¿ä¼Ò ¹öÀü. colorFactory°¡ org.eclipse.core.runtime.IExecutableExtensionÀ» ±¸ÇöÇϰí ÃʱâÈ­¿¡ »ç¿ëÇÏ·Á´Â ¸Å°³º¯¼ö µ¥ÀÌÅͰ¡ ÀÖÀ» ¶§ »ç¿ëµË´Ï´Ù.



<!ELEMENT parameter EMPTY>

<!ATTLIST parameter

name  CDATA #REQUIRED

value CDATA #REQUIRED>

colorFactory ¿ä¼Ò¿¡¼­ »ç¿ëÇÒ ¸Å°³º¯¼ö ¿ä¼Ò. ÀÌ ¿ä¼Ò´Â colorFactory Ŭ·¡½º¿¡ ÃʱâÈ­ µ¥ÀÌÅÍ·Î Àü´ÞµË´Ï´Ù.



<!ELEMENT data EMPTY>

<!ATTLIST data

name  CDATA #REQUIRED

value CDATA #REQUIRED>

ÀÓÀÇ µ¥ÀÌÅ͸¦ ÁÖÁ¦ ¶Ç´Â ±âº» ÁÖÁ¦¿Í ¿¬°ü½Ãų ¼ö ÀÖ°Ô ÇÏ´Â ¿ä¼Ò. ÀÌ µ¥ÀÌÅÍ´Â Áõ°¨ ¹æÇâ ¶Ç´Â ¹éºÐÀ², ·¹À̺í, ÀÛ¼ºÀÚ Á¤º¸ µîÀÏ ¼ö ÀÖ½À´Ï´Ù.

ÀÌ ¿ä¼Ò´Â Á¤ÀÇ ¹× ´ëü¿Í À¯»çÇÏ°Ô ÀÛµ¿ÇÕ´Ï´Ù. ±âº» ÁÖÁ¦¿Í ½Äº°µÈ ÁÖÁ¦ ¸ðµÎ¿¡¼­ ۰¡ ³ªÅ¸³ª¸é ÇØ´ç ÁÖÁ¦¿¡ ¾×¼¼½ºÇÒ ¶§ ½Äº°µÈ ÁÖÁ¦ °ªÀ» »ç¿ëÇÕ´Ï´Ù. ½Äº°µÈ ÁÖÁ¦°¡ °ªÀ» Á¦°øÇÏÁö ¾ÊÀ¸¸é ±âº»°ªÀÌ »ç¿ëµË´Ï´Ù.



<!ELEMENT colorValue (colorFactory?)>

<!ATTLIST colorValue

os           CDATA #IMPLIED

ws           CDATA #IMPLIED

value        CDATA #IMPLIED

colorFactory CDATA #IMPLIED>

ÀÌ ¿ä¼Ò´Â Ç÷§Æû ±âÁØÀ¸·Î »ö»ó °ªÀÇ ½ºÆåÀ» Çã¿ëÇÕ´Ï´Ù.



<!ELEMENT fontValue EMPTY>

<!ATTLIST fontValue

os    CDATA #IMPLIED

ws    CDATA #IMPLIED

value CDATA #REQUIRED>

ÀÌ ¿ä¼Ò´Â Ç÷§Æû¿¡ ±âÃÊÇÏ¿© ±Û²Ã °ªÀÇ ½ºÆåÀ» Çã¿ëÇÕ´Ï´Ù.



<!ELEMENT categoryPresentationBinding EMPTY>

<!ATTLIST categoryPresentationBinding

categoryId     CDATA #REQUIRED

presentationId CDATA #REQUIRED>

ÀÌ ¿ä¼Ò¸¦ »ç¿ëÇϸé org.eclipse.ui.presentationFactory È®ÀåÁ¡¿¡¼­ ¼³¸íÇÑ ´ë·Î Ä«Å×°í¸®¸¦ ƯÁ¤ ÇÁ¸®Á¨Å×À̼ǿ¡ ¹ÙÀεåÇÒ ¼ö ÀÖ½À´Ï´Ù. Ä«Å×°í¸®¿¡ ÇÁ¸®Á¨Å×ÀÌ¼Ç ¹ÙÀεùÀÌ ÀÖÀ¸¸é Ä«Å×°í¸® ¹× ÇÏÀ§°¡ Ȱ¼º ÇÁ¸®Á¨Å×À̼ÇÀ¸·Î ¹ÙÀεåµÈ °æ¿ì¿¡ »ç¿ëÀÚ¸¸ ÀÌ Ä«Å×°í¸® ¹× ÇÏÀ§¸¦ ±¸¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ´Â »ç¿ëÀÚ °í·Á»çÇ׿¡¼­ »ç¿ëÇÏÁö ¾Ê´Â Ç׸ñÀ» Á¦°ÅÇÒ °æ¿ì¿¡ À¯¿ëÇÕ´Ï´Ù.



´ÙÀ½Àº ¿©·¯ »ö»ó ¹× ±Û²Ã Á¤ÀÇ »Ó ¾Æ´Ï¶ó À̸¦ ´ëüÇÏ´Â ÁÖÁ¦ÀÇ ¿¹Á¦ÀÔ´Ï´Ù.

   

<extension point=

"org.eclipse.ui.themes"

>

<themeElementCategory id=

"com.xyz.ThemeCategory"

class=

"com.xyz.XYZPreview"

label=

"XYZ Elements"

/>

<colorDefinition id=

"com.xyz.Forground"

categoryId=

"com.xyz.ThemeCategory"

label=

"XYZ Foreground Color"

value=

"COLOR_BLACK"

>

<!-- white should be used on GTK -->

<colorValue value=

"COLOR_WHITE"

os=

"linux"

ws=

"gtk"

/>

<description>

This color is used for the forground color of the XYZ plugin editor.

</description>

</colorDefinition>

<colorDefinition id=

"com.xyz.Background"

categoryId=

"com.xyz.ThemeCategory"

label=

"XYZ Background Color"

>

<colorFactory class=

"org.eclipse.ui.themes.RGBBlendColorFactory"

plugin=

"org.eclipse.ui"

>

<parameter name=

"color1"

value=

"COLOR_WHITE"

/>

<parameter name=

"color2"

value=

"COLOR_BLUE"

/>

</colorFactory>

<!-- black should be used on GTK -->

<colorValue value=

"COLOR_BLACK"

os=

"linux"

ws=

"gtk"

/>

<description>

This color is used for the background color of the XYZ plugin editor.

</description>

</colorDefinition>

<fontDefiniton id=

"com.xyz.TextFont"

categoryId=

"com.xyz.ThemeCategory"

label=

"XYZ Editor Font"

defaultsTo=

"org.eclipse.jface.textfont"

>

<description>

This font is used by the XYY plugin editor.

</description>

</fontDefintion>

<data name=

"com.xyz.EditorMarginWidth"

value=

"5"

/>

<theme id=

"com.xyz.HarshTheme"

label=

"Harsh Colors for XYZ"

>

<colorOverride id=

"com.xyz.Forground"

value=

"COLOR_CYAN"

/>

<colorOverride id=

"com.xyz.Background"

value=

"COLOR_MAGENTA"

/>

<data name=

"com.xyz.EditorMarginWidth"

value=

"1"

/>

</theme>

</extension>

org.eclipse.ui.IWorkbench.getThemeManager()´Â org.eclipse.ui.themes.IThemeManager¸¦ Á¦°øÇÕ´Ï´Ù. ÀÌ Å¬·¡½º´Â ¸í¸íµÈ ÁÖÁ¦(IThemeManager.DEFAULT_THEME ID°¡ ÀÖ´Â ±âº» ÁÖÁ¦¸¦ Æ÷ÇÔÇÏ´Â ID¿¡ ÀÇÇØ) ¶Ç´Â ÇöÀç ÁÖÁ¦¸¦ È®º¸ÇÏ´Â µ¥ »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù. org.eclipse.ui.themes.ITheme¿¡¼­ org.eclipse.jface.resources.ColorRegistry, org.eclipse.jface.resources.FontRegistry ¹× ÁÖÁ¦¿Í ¿¬°üµÈ ÀÓÀÇ µ¥ÀÌÅ͸¦ ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.

Workbench´Â ÅØ½ºÆ®, ´ëÈ­ »óÀÚ, ¹è³Ê, Çì´õ ¹× ºÎºÐ Á¦¸ñ ±Û²Ã¿¡ ´ëÇÑ ±Û²Ã Á¤ÀǸ¦ Á¦°øÇÕ´Ï´Ù. ¶ÇÇÑ ÇÏÀÌÆÛ¸µÅ©, Ȱ¼º ÇÏÀÌÆÛ¸µÅ©, ¿À·ù, Ȱ¼º ºÎºÐ(¹è°æ Áõ°¨ ºÎºÐ ¹× Àü°æ) ¹× ºñȰ¼º ºÎºÐ(¹è°æ Áõ°¨ ºÎºÐ ¹× Àü°æ)¿¡ ´ëÇÑ »ö»ó Á¤ÀǸ¦ Á¦°øÇÕ´Ï´Ù. ¶ÇÇÑ Workbench´Â Á¦¸ñ Áõ°¨ ¹éºÐÀ²(Ȱ¼º ¹× ºñȰ¼º) ¹× Áõ°¨ ¹æÇâ(Ȱ¼º ¹× ºñȰ¼º)¿¡ ´ëÇÑ µ¥ÀÌÅÍ »ó¼ö¸¦ Á¦°øÇÕ´Ï´Ù. Workbench´Â ¸ðµç ¸í¸íµÈ ÁÖÁ¦¸¦ Á¦°øÇÏÁö ¾Ê½À´Ï´Ù.