125 |
|
|
126 |
try |
try |
127 |
{ |
{ |
128 |
text = elem.getDocument().getText(elem.getStartOffset(), |
text = elem.getDocument().getText(elem.getStartOffset(), |
129 |
elem.getEndOffset()); |
elem.getEndOffset()); |
130 |
} |
} |
131 |
catch (BadLocationException e) |
catch (BadLocationException e) |
132 |
{ |
{ |
133 |
// This should never happen. |
// Should never happen |
134 |
text = ""; |
AssertionError ae = new AssertionError(); |
135 |
|
ae.initCause(e); |
136 |
|
throw ae; |
137 |
} |
} |
138 |
|
|
139 |
return fm.stringWidth(text) + 30; |
return fm.stringWidth(text); |
140 |
} |
} |
141 |
|
|
142 |
public int getResizeWeight(int axis) |
public int getResizeWeight(int axis) |