Lines 32-43
Link Here
|
32 |
class WelcomeComponent extends TopComponent{ |
32 |
class WelcomeComponent extends TopComponent{ |
33 |
static final long serialVersionUID=6021472310161712674L; |
33 |
static final long serialVersionUID=6021472310161712674L; |
34 |
private static WelcomeComponent component = null; |
34 |
private static WelcomeComponent component = null; |
|
|
35 |
private int width, height; |
35 |
|
36 |
|
36 |
private WelcomeComponent(){ |
37 |
private WelcomeComponent(){ |
37 |
putClientProperty("PersistenceType", "OnlyOpened"); |
38 |
putClientProperty("PersistenceType", "OnlyOpened"); |
38 |
setLayout(new BorderLayout()); |
39 |
setLayout(new BorderLayout()); |
39 |
setName(NbBundle.getMessage(WelcomeComponent.class, "LBL_Tab_Title")); //NOI18N |
40 |
setName(NbBundle.getMessage(WelcomeComponent.class, "LBL_Tab_Title")); //NOI18N |
40 |
JScrollPane scroll = new JScrollPane(); |
41 |
//JScrollPane scroll = new JScrollPane(); |
41 |
JComponent panel = null; |
42 |
JComponent panel = null; |
42 |
try{ |
43 |
try{ |
43 |
panel =(JComponent)Class.forName(NbBundle.getMessage(WelcomeComponent.class,"CLASS_content_panel")).newInstance(); |
44 |
panel =(JComponent)Class.forName(NbBundle.getMessage(WelcomeComponent.class,"CLASS_content_panel")).newInstance(); |
Lines 48-62
Link Here
|
48 |
return; |
49 |
return; |
49 |
if(panel instanceof org.netbeans.modules.welcome.ContentPanel){ |
50 |
if(panel instanceof org.netbeans.modules.welcome.ContentPanel){ |
50 |
//JPanel panel = new ContentPanel(); |
51 |
//JPanel panel = new ContentPanel(); |
|
|
52 |
try{ |
51 |
if(System.getProperty("os.name").indexOf("Windows") != -1){ //NOI18N |
53 |
if(System.getProperty("os.name").indexOf("Windows") != -1){ //NOI18N |
52 |
panel.setMinimumSize(new Dimension(620, 579)); |
54 |
width = new Integer(NbBundle.getMessage(WelcomeComponent.class,"Win_Content_panel_width")).intValue(); |
53 |
panel.setPreferredSize(new Dimension(620, 579)); |
55 |
height = new Integer (NbBundle.getMessage(WelcomeComponent.class,"Win_Content_panel_height")).intValue(); |
54 |
}else{ |
56 |
}else{ |
55 |
panel.setMinimumSize(new Dimension(640, 589)); |
57 |
width = new Integer(NbBundle.getMessage(WelcomeComponent.class,"Content_panel_width")).intValue(); |
56 |
panel.setPreferredSize(new Dimension(640, 589)); |
58 |
height = new Integer(NbBundle.getMessage(WelcomeComponent.class,"Content_panel_height")).intValue(); |
|
|
59 |
} |
60 |
}catch(NumberFormatException ep){ |
61 |
ErrorManager.getDefault().notify(ep); |
57 |
} |
62 |
} |
58 |
} |
63 |
} |
59 |
scroll.setViewportView(panel); |
64 |
panel.setMinimumSize(new Dimension(width,height)); |
|
|
65 |
panel.setPreferredSize(new Dimension(width,height)); |
66 |
JScrollPane scroll = new JScrollPane(panel); |
60 |
setCloseOperation(TopComponent.CLOSE_EACH); |
67 |
setCloseOperation(TopComponent.CLOSE_EACH); |
61 |
add(scroll); |
68 |
add(scroll); |
62 |
try{ |
69 |
try{ |