35 | | * The different possible keys are as follows: ArrowButton, Button, CheckBox, RadioButton, ToggleButton, ComboBox, InternalFrame, InternalFrameTitlePane, InternalFrameTitlePane.closeButton, InternalFrameTitlePane.iconifyButton, InternalFrameTitlePane.maximizeButton, DesktopPane, FileChooser, List, MenuBar, Menu, MenuItem, MenuItemAccelerator, CheckBoxMenuItem, RadioButtonMenuItem, PopupMenu, PopupMenuSeparator, OptionPane, RootPane, Panel, ProgressBar, ScrollBar, ScrollBarTrack, ScrollBarThumb, ScrollPane, Viewport, Separator, Slider, SliderTrack, SliderThumb, SplitPane, SplitPaneDivider, Table, TableHeader, TabbedPane, TabbedPaneContent, TabbedPaneTab, TabbedPaneTabArea, Label, ToolTip, TextField, FormattedTextField, PasswordField, TextArea, TextPane, EditorPane, Spinner, ComboBox.listRenderer, TableHeader.renderer, ToolBar, ToolBarContent, ToolBarSeparator, ToolBarDragWindow, Tree, TreeCell, '''And may be more...''' |
| 36 | * Basically what we need to define is styles for every key. As you can see there are states for most UI components that need different icons. What is more there are addition attributes for a component called properties. See the next example: |
| 37 | {{{ |
| 38 | <style id="InternalFrameTitlePaneStyle"> |
| 39 | <property key="InternalFrameTitlePane.titleSpacing" type="integer" value="25"/> |
| 40 | |
| 41 | <property key="InternalFrameTitlePane.maxFrameIconSize" type="dimension" value="24 24"/> |
| 42 | <imageIcon id="InternalFrameMaximizeButtonIcon" path="btn_close_roll.png"/> |
| 43 | <property key="InternalFrameTitlePane.maximizeIcon" type="idref" value="InternalFrameMaximizeButtonIcon"/> |
| 44 | |
| 45 | <imageIcon id="InternalFrame_CloseButton_Icon" path="btn_close_roll.png"/> |
| 46 | <property key="InternalFrameTitlePane.closeIcon" type="idref" value="InternalFrame_CloseButton_Icon"/> |
| 47 | |
| 48 | <imageIcon id="InternalFrame_RestoreButton_Icon" path="resource/1204295742281_internal_frame_restore_icon.png"/> |
| 49 | <property key="InternalFrameTitlePane.minimizeIcon" type="idref" value="InternalFrame_RestoreButton_Icon"/> |
| 50 | |
| 51 | <imageIcon id="InternalFrame_MinimizeButton_Icon" path="resource/1204296642906_internal_frame_min_icon.png"/> |
| 52 | <property key="InternalFrameTitlePane.iconifyIcon" type="idref" value="InternalFrame_MinimizeButton_Icon"/> |
| 53 | <state> |
| 54 | <imagePainter method="InternalFrameTitlePaneBackground" path="title_bar_bg.png" sourceInsets="0 0 0 0"/> |
| 55 | </state> |
| 56 | </style> |
| 57 | <bind style="InternalFrameTitlePaneStyle" type="region" key="InternalFrameTitlePane"/> |
| 58 | |
| 59 | }}} |
| 60 | |
| 61 | * Basically what we need to do is define styles for as much keys as possible. Of course not every part should be customized but it will look nicer if we do so. |
| 62 | |
| 63 | * The different possible keys are as follows: ArrowButton, Button, CheckBox, RadioButton, ToggleButton, ComboBox, InternalFrame, InternalFrameTitlePane, InternalFrameTitlePane.closeButton, InternalFrameTitlePane.iconifyButton, InternalFrameTitlePane.maximizeButton, DesktopPane, FileChooser, List, MenuBar, Menu, MenuItem, MenuItemAccelerator, CheckBoxMenuItem, RadioButtonMenuItem, PopupMenu, PopupMenuSeparator, OptionPane, RootPane, Panel, ProgressBar, ScrollBar, ScrollBarTrack, ScrollBarThumb, ScrollPane, Viewport, Separator, Slider, SliderTrack, SliderThumb, SplitPane, SplitPaneDivider, Table, TableHeader, TabbedPane, TabbedPaneContent, TabbedPaneTab, TabbedPaneTabArea, Label, ToolTip, TextField, FormattedTextField, PasswordField, TextArea, TextPane, EditorPane, Spinner, ComboBox.listRenderer, TableHeader.renderer, ToolBar, ToolBarContent, ToolBarSeparator, ToolBarDragWindow, Tree, TreeCell '''and may be more''' ... |
| 64 | |
| 65 | == Overview of our approach == |
| 66 | * Images used to create the look and feel will be named like this "button_pressed.png" for example. |
| 67 | * The XML file will be named "sophie2.xml" |