Ticket #2268: 2268.patch

File 2268.patch, 12.1 KB (added by kyli, 15 years ago)
  • src/main/java/org/sophie2/main/skin/alternative/SkinDefIds.java

    ### Eclipse Workspace Patch 1.0
    #P org.sophie2.main.skin.alternative
     
    149149                "main.layout.md-main-window/mydoggy-title-bar-active : icon : empty_background.png", 
    150150                "main.layout.md-main-window/mydoggy-title-bar-inactive : icon : empty_background.png", 
    151151                 
    152                 "main.layout.md-main-window/tab-button-thickness : integer : 39", 
     152                "main.layout.md-main-window/vert-tab-button-thickness : integer : 30", 
     153                "main.layout.md-main-window/hor-tab-button-thickness : integer : 25", 
    153154                 
    154155                "main.layout.md-main-window/mydoggy-top-active-tab : icon : mydoggy/tabs/top_active.png", 
    155156                "main.layout.md-main-window/mydoggy-bottom-active-tab : icon : mydoggy/tabs/bottom_active.png", 
     
    178179                "main.layout.md-main-window/AUTO_HIDE_OFF_INACTIVE : icon : btn_flap_pin.png", 
    179180                 
    180181                //= Palettes = 
    181                 "main.layout.md-compound-element/tab-button-thickness : integer : 39", 
     182                "main.layout.md-compound-element/tab-button-thickness : integer : 30", 
    182183                "main.layout.md-compound-element/mydoggy-top-active-tab : icon : mydoggy/tabs/top_active.png", 
    183184                "main.layout.md-compound-element/mydoggy-bottom-active-tab : icon : mydoggy/tabs/bottom_active.png", 
    184185                "main.layout.md-compound-element/mydoggy-left-active-tab : icon : mydoggy/tabs/left_active.png", 
  • src/main/java/org/sophie2/main/layout/mydoggy/MDSkinUpdater.java

    #P org.sophie2.main.layout.mydoggy
     
    320320                        @Override 
    321321                        protected Integer compute() { 
    322322                                Integer res = SkinUtil.getSkinValue(skinClass().get(),  
    323                                                 MDManageable.MYDOGGY_TAB_BUTTON_THICKNESS, Integer.class); 
     323                                                MDManageable.MYDOGGY_V_TAB_BUTTON_THICKNESS, Integer.class); 
    324324                                return res; 
    325325                        } 
    326326                } 
  • src/main/java/org/sophie2/main/layout/mydoggy/MDMainWindow.java

     
    77import java.util.Collection; 
    88import java.util.HashMap; 
    99import java.util.Map; 
     10 
    1011import javax.swing.JComponent; 
    1112import javax.swing.JInternalFrame; 
    1213import javax.swing.JPanel; 
    1314import javax.swing.JScrollPane; 
    1415import javax.swing.ScrollPaneConstants; 
    1516import javax.swing.SwingUtilities; 
     17 
    1618import org.noos.xing.mydoggy.Content; 
    1719import org.noos.xing.mydoggy.ContentManager; 
    1820import org.noos.xing.mydoggy.DockedTypeDescriptor; 
     
    6971        @SkinPartDef 
    7072        private static void defineSkin(ElementSkinPart part) { 
    7173                part.add(MYDOGGY_BOOLEAN_COLORED_UI, Boolean.TRUE); 
    72                 part.add(MYDOGGY_TAB_BUTTON_THICKNESS, 23); 
     74                part.add(MYDOGGY_V_TAB_BUTTON_THICKNESS, 30); 
    7375                part.add(MDColorId.TAB_COLOR_END.getSkinId(), DEFAULT_COLOR); 
    7476                part.add(MDColorId.TAB_COLOR_START.getSkinId(), DEFAULT_COLOR); 
    7577                part.add(MDColorId.TITLE_BAR_COLOR_END.getSkinId(), DEFAULT_COLOR); 
     
    287289                        @SuppressWarnings("synthetic-access") 
    288290                        @Override 
    289291                        protected void setup(MyDoggyToolWindowManager toolWindowManager) { 
    290  
    291                                 Integer thickness = getSkinValue(MYDOGGY_TAB_BUTTON_THICKNESS, Integer.class); 
    292                                 if (thickness != null) { 
    293                                         toolWindowManager.getToolWindowBar(ToolWindowAnchor.LEFT).setLength(thickness); 
    294                                         toolWindowManager.getToolWindowBar(ToolWindowAnchor.RIGHT).setLength(thickness); 
    295                                         toolWindowManager.getToolWindowBar(ToolWindowAnchor.BOTTOM).setLength(thickness); 
    296                                         toolWindowManager.getToolWindowBar(ToolWindowAnchor.TOP).setLength(thickness); 
     292                                Integer vThickness = getSkinValue(MYDOGGY_V_TAB_BUTTON_THICKNESS, Integer.class); 
     293                                Integer hThickness = getSkinValue(MYDOGGY_H_TAB_BUTTON_THICKNESS, Integer.class); 
     294                                if (hThickness != null && vThickness != null) { 
     295                                        toolWindowManager.getToolWindowBar(ToolWindowAnchor.LEFT).setLength(vThickness); 
     296                                        toolWindowManager.getToolWindowBar(ToolWindowAnchor.RIGHT).setLength(vThickness); 
     297                                        toolWindowManager.getToolWindowBar(ToolWindowAnchor.BOTTOM).setLength(hThickness); 
     298                                        toolWindowManager.getToolWindowBar(ToolWindowAnchor.TOP).setLength(hThickness); 
    297299                                } 
    298300                        } 
    299301                } 
  • src/main/java/org/sophie2/main/layout/mydoggy/mdcustomization/SophieTabButtonUI.java

     
    5252                        //XXX UGLY bugfix --peko 
    5353                        if(this.toolWindow.getAnchor().equals(ToolWindowAnchor.BOTTOM) || 
    5454                                        this.toolWindow.getAnchor().equals(ToolWindowAnchor.TOP)) { 
    55                                 Dimension size = new Dimension(100, 35); 
     55                                Dimension size = new Dimension(100, 25); 
    5656                                c.setSize(size); 
    5757                                c.setPreferredSize(size); 
    5858                        } 
     
    7474                                Dimension size = null; 
    7575 
    7676                                if(this.skinUpdater.tabButtonThickness().get() != null) { 
    77                                         size = new Dimension(100, this.skinUpdater.tabButtonThickness().get() - 4); 
     77                                        size = new Dimension(100, this.skinUpdater.tabButtonThickness().get()); 
    7878                                } else { 
    79                                         size = new Dimension(100, 35); 
     79                                        size = new Dimension(100, 25); 
    8080                                } 
    8181 
    8282                                c.setSize(size); 
  • src/main/java/org/sophie2/main/layout/mydoggy/MDManageable.java

     
    2525        public final static String MYDOGGY_BOOLEAN_COLORED_UI = "colored-ui";  
    2626         
    2727        /** 
    28          * ID used for skin record customizing  
    29          * the width/height of vertical/horizontal tab buttons. 
     28         * ID used for skin record customizing the width of vertical tab buttons. 
     29         */ 
     30        public final static String MYDOGGY_V_TAB_BUTTON_THICKNESS = "vert-tab-button-thickness"; 
     31         
     32        /** 
     33         * ID used for skin record customizing the height of horizontal tab buttons. 
    3034         */ 
    31         public final static String MYDOGGY_TAB_BUTTON_THICKNESS = "tab-button-thickness"; 
     35        public final static String MYDOGGY_H_TAB_BUTTON_THICKNESS = "hor-tab-button-thickness"; 
     36         
    3237         
    3338        /** 
    3439         * Obtains the tool window manager of the compound element. 
  • src/main/java/org/sophie2/main/layout/mydoggy/mdcustomization/SophieToolWindowBar.java

     
    11package org.sophie2.main.layout.mydoggy.mdcustomization; 
    22 
     3import info.clearthought.layout.TableLayoutConstants; 
    34import info.clearthought.layout.TableLayoutConstraints; 
    45 
    56import java.awt.Component; 
     
    4849         
    4950        @Override 
    5051        protected void initComponents() { 
     52                 
    5153                this.splitPane.setName(this.anchor.toString()); 
    5254        this.splitPane.setFocusCycleRoot(true); 
    5355 
     
    6466                this.horizontal = false; 
    6567                this.representativeButtonsPanel.setLayout( 
    6668                        this.representativeButtonsPanelLayout = new ExtendedTableLayout( 
    67                                 new double[][]{{4, getLength()-4, 0}, {TOP_PADDING}} 
     69                                new double[][]{{TableLayoutConstants.FILL}, {TOP_PADDING}} 
    6870                        ) 
    6971                ); 
    7072                break; 
     
    7274                this.horizontal = false; 
    7375                this.representativeButtonsPanel.setLayout( 
    7476                        this.representativeButtonsPanelLayout = new ExtendedTableLayout( 
    75                                 new double[][]{{0, getLength()-4, 4}, {TOP_PADDING}} 
     77                                new double[][]{{TableLayoutConstants.FILL}, {TOP_PADDING}} 
    7678                        ) 
    7779                ); 
    7880                this.orientation = JSplitPane.VERTICAL_SPLIT; 
     
    8183                this.horizontal = true; 
    8284                this.representativeButtonsPanel.setLayout( 
    8385                        this.representativeButtonsPanelLayout = new ExtendedTableLayout( 
    84                                 new double[][]{{0}, {4, getLength()-4, 0}} 
     86                                new double[][]{{0}, {TableLayoutConstants.FILL}} 
    8587                        ) 
    8688                ); 
    8789                this.orientation = JSplitPane.HORIZONTAL_SPLIT; 
     
    120122                        int newCol1 = constraints.col1 + 2; 
    121123                        this.representativeButtonsPanelLayout.setConstraints(component, 
    122124                                                                        new TableLayoutConstraints( 
    123                                                                                 newCol1 + ",1," 
     125                                                                                newCol1 + ",0," 
    124126                                                                        )); 
    125127 
    126128                        olds.put(newCol1, this.representativeButtonsPanelLayout.getColumn(newCol1)); 
     
    132134                    } 
    133135                } 
    134136                this.representativeButtonsPanelLayout.setColumn(finalCol, width); 
    135                 this.representativeButtonsPanel.add(representativeAnchor, (index * 2 + 2) + ",1"); 
     137                this.representativeButtonsPanel.add(representativeAnchor, (index * 2 + 2) + ",0"); 
    136138            } else 
    137                 this.representativeButtonsPanel.add(representativeAnchor, (this.representativeButtonsPanelLayout.getNumColumn() - 1) + ",1"); 
     139                this.representativeButtonsPanel.add(representativeAnchor, (this.representativeButtonsPanelLayout.getNumColumn() - 1) + ",0"); 
    138140        } else { 
    139141            int height = Math.max(representativeAnchor.getHeight(), 
    140142                                  Math.max(representativeAnchor.getPreferredSize().height, 
     
    159161                        int newRow1 = constraints.row1 + 2; 
    160162                        this.representativeButtonsPanelLayout.setConstraints(component, 
    161163                                                                        new TableLayoutConstraints( 
    162                                                                                 "1," + newRow1 
     164                                                                                "0," + newRow1 
    163165                                                                        )); 
    164166 
    165167                        olds.put(newRow1, this.representativeButtonsPanelLayout.getRow(newRow1)); 
     
    175177                } else 
    176178                        this.representativeButtonsPanelLayout.setRow(finalRow, height); 
    177179 
    178                 this.representativeButtonsPanel.add(representativeAnchor, "1," + (index * 2 + 2)); 
     180                this.representativeButtonsPanel.add(representativeAnchor, "0," + (index * 2 + 2)); 
    179181            } else 
    180                 this.representativeButtonsPanel.add(representativeAnchor, "1," + (this.representativeButtonsPanelLayout.getNumRow() - 1)); 
     182                this.representativeButtonsPanel.add(representativeAnchor, "0," + (this.representativeButtonsPanelLayout.getNumRow() - 1)); 
    181183        } 
    182184        SwingUtil.repaint(this.toolScrollBar); 
    183185    } 
  • src/main/java/org/sophie2/main/layout/mydoggy/MDTab.java

     
    5656                part.add(MDColorId.TAB_COLOR_START.getSkinId(), DEFAULT_COLOR); 
    5757                part.add(MDColorId.TITLE_BAR_COLOR_END.getSkinId(), DEFAULT_COLOR); 
    5858                part.add(MDColorId.TITLE_BAR_COLOR_START.getSkinId(), DEFAULT_COLOR); 
    59                 part.add(MYDOGGY_TAB_BUTTON_THICKNESS, 23); 
     59                part.add(MYDOGGY_V_TAB_BUTTON_THICKNESS, 30); 
    6060 
    6161        } 
    6262