Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "E4/CSS/SWT Mapping"

< E4‎ | CSS
Line 66: Line 66:
 
<td>setBorderVisible(Boolean)</td>
 
<td>setBorderVisible(Boolean)</td>
 
<td>border-visible</td>
 
<td>border-visible</td>
<td>CTabFolder { borderVisible: true }</td>
+
<td>CTabFolder { border-visible: true }</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 84: Line 84:
 
<td>setMaximizeVisible(Boolean)</td>
 
<td>setMaximizeVisible(Boolean)</td>
 
<td>maximize-visible</td>
 
<td>maximize-visible</td>
<td>CTabFolder { maximizeVisible: true }</td>
+
<td>CTabFolder { maximize-visible: true }</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 90: Line 90:
 
<td>setMinimizeVisible(Boolean)</td>
 
<td>setMinimizeVisible(Boolean)</td>
 
<td>minimize-visible</td>
 
<td>minimize-visible</td>
<td>CTabFolder { minimizeVisible: true }</td>
+
<td>CTabFolder { minimize-visible: true }</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
 
<td>CTabFolder</td>
 
<td>CTabFolder</td>
 
<td>setMRUVisible(Boolean)</td>
 
<td>setMRUVisible(Boolean)</td>
<td>mruVisible</td>
+
<td>mru-visible</td>
 
<td>CTabFolder { mru-visible: true }</td>
 
<td>CTabFolder { mru-visible: true }</td>
 
</tr>
 
</tr>
Line 101: Line 101:
 
<td>CTabFolder</td>
 
<td>CTabFolder</td>
 
<td>setShowClose(Boolean)</td>
 
<td>setShowClose(Boolean)</td>
<td>showClose</td>
+
<td>show-close</td>
 
<td>CTabFolder { show-close: true }</td>
 
<td>CTabFolder { show-close: true }</td>
 
</tr>
 
</tr>
Line 119: Line 119:
 
<td>CTabFolder</td>
 
<td>CTabFolder</td>
 
<td>setUnselectedCloseVisible(Boolean)</td>
 
<td>setUnselectedCloseVisible(Boolean)</td>
<td>unselectedCloseVisible</td>
+
<td>unselected-close-visible</td>
 
<td>CTabFolder { unselected-close-visible: true }</td>
 
<td>CTabFolder { unselected-close-visible: true }</td>
 
</tr>
 
</tr>
Line 125: Line 125:
 
<td>CTabFolder</td>
 
<td>CTabFolder</td>
 
<td>setUnselectedImageVisible(Boolean)</td>
 
<td>setUnselectedImageVisible(Boolean)</td>
<td>unselectedImageVisible</td>
+
<td>unselected-image-visible</td>
 
<td>CTabFolder { unselected-image-visible: true }</td>
 
<td>CTabFolder { unselected-image-visible: true }</td>
 
</tr>
 
</tr>

Revision as of 11:39, 3 March 2009

How to style SWT widgets using CSS

SWT Widgets SWT Method CSS Property Name CSS Example
any control setBackground(Color) background-color Button { background-color: #FF0000 }
any control setBackgroundImage(Image) background-image Button { background-image: some url }
any control border-color Button { border-color: ##FF0000; }
any control border-width Button { border-width: 3 }
any control border-style Button { border-style: dotted }
any control setCurosr(Cursor) cursor Shell { cursor:crosshair }
any control setFont(Font) font-style

font-size
font-weight

font-family
Label { font-style: italic;

          font-size: 12;
          font-weight: bold;

          font-family: "Terminal"; }
any control setForeground(Color) color Button { color: #FF0000 }
CTabFolder setBorderVisible(Boolean) border-visible CTabFolder { border-visible: true }
CTabFolder setMaximized(Boolean) maximized CTabFolder { maximized: true }
CTabFolder setMinimized(Boolean) minimized CTabFolder { minimized: true }
CTabFolder setMaximizeVisible(Boolean) maximize-visible CTabFolder { maximize-visible: true }
CTabFolder setMinimizeVisible(Boolean) minimize-visible CTabFolder { minimize-visible: true }
CTabFolder setMRUVisible(Boolean) mru-visible CTabFolder { mru-visible: true }
CTabFolder setShowClose(Boolean) show-close CTabFolder { show-close: true }
CTabFolder setSimple(Boolean) simple CTabFolder { simple: true }
CTabFolder setSingle(Boolean) single CTabFolder { single: true }
CTabFolder setUnselectedCloseVisible(Boolean) unselected-close-visible CTabFolder { unselected-close-visible: true }
CTabFolder setUnselectedImageVisible(Boolean) unselected-image-visible CTabFolder { unselected-image-visible: true }





Pseudo classes which can be used in CSS to style SWT widgets

SWT Widgets CSS Pseudo Selector CSS Example
CTabFolder :selected CTabFolder:selected { background-color: ##FF0000; }
Shell :active Shell:active { background-color: ##FF0000; }
any control :focus CTabFolder:focus { background-color: ##FF0000; }

Copyright © Eclipse Foundation, Inc. All Rights Reserved.