Line 19
Link Here
|
|
|
19 |
import javax.swing.JSplitPane; |
Line 34
Link Here
|
34 |
import org.openide.awt.SplittedPanel; |
|
|
Line 175
Link Here
|
|
|
175 |
|
176 |
public void reshape (int x, int y, int w, int h) { |
177 |
super.reshape (x,y,w,h); |
178 |
//issue 34104, bad sizing/split location for Chinese locales that require |
179 |
//a larger default font size |
180 |
split.setDividerLocation ((w / 3) + (w/7)); |
181 |
} |
Line 176
Link Here
|
|
|
183 |
private transient JSplitPane split=null; |
Lines 178-179
Link Here
|
178 |
|
186 |
|
179 |
SplittedPanel split = new SplittedPanel(); |
187 |
|
180 |
-- |
188 |
split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT); |
Lines 182-186
Link Here
|
182 |
split.setSplitPosition(SplittedPanel.SECOND_PREFERRED); |
191 |
split.setLeftComponent(view); |
183 |
view.setPreferredSize(new Dimension(500, 450)); |
192 |
split.setRightComponent(propertyView); |
184 |
split.add(view, SplittedPanel.ADD_LEFT); |
|
|
185 |
propertyView.setPreferredSize(new Dimension(300, 450)); |
186 |
split.add(propertyView, SplittedPanel.ADD_RIGHT); |
187 |
-- |
Line 245
Link Here
|
|
|
251 |
|
252 |
/** Overridden to provide a larger preferred size if the default font |
253 |
* is larger, for locales that require this. */ |
254 |
public Dimension getPreferredSize() { |
255 |
//issue 34104, bad sizing/split location for Chinese locales that require |
256 |
//a larger default font size |
257 |
Dimension result = super.getPreferredSize(); |
258 |
int fontsize = |
259 |
javax.swing.UIManager.getFont ("Tree.font").getSize(); //NOI18N |
260 |
if (fontsize > 11) { |
261 |
int factor = fontsize - 11; |
262 |
result.height += 15 * factor; |
263 |
result.width += 50 * factor; |
264 |
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); |
265 |
if (result.height > screen.height) { |
266 |
result.height = screen.height -30; |
267 |
} |
268 |
if (result.width > screen.width) { |
269 |
result.width = screen.width -30; |
270 |
} |
271 |
} else { |
272 |
result.width += 20; |
273 |
result.height +=20; |
274 |
} |
275 |
return result; |
276 |
} |
Line 459
Link Here
|
459 |
|
|
|
Line 465
Link Here
|
465 |
} |
496 |
} |
466 |
-- |
497 |
|