git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TButton: allow to get/set the action
[fanfix.git]
/
src
/
jexer
/
TWidget.java
diff --git
a/src/jexer/TWidget.java
b/src/jexer/TWidget.java
index 60bc3e4a618c0cce09d84cbdbedfdc200da39906..e11a947687027b4da7de59b10d51f1542ea54342 100644
(file)
--- a/
src/jexer/TWidget.java
+++ b/
src/jexer/TWidget.java
@@
-935,8
+935,9
@@
public abstract class TWidget implements Comparable<TWidget> {
this.x = x;
this.y = y;
this.x = x;
this.y = y;
- this.width = width;
- this.height = height;
+ // Call the functions so that subclasses can choose how to handle it.
+ setWidth(width);
+ setHeight(height);
if (layout != null) {
layout.onResize(new TResizeEvent(TResizeEvent.Type.WIDGET,
width, height));
if (layout != null) {
layout.onResize(new TResizeEvent(TResizeEvent.Type.WIDGET,
width, height));
@@
-1367,7
+1368,7
@@
public abstract class TWidget implements Comparable<TWidget> {
*
* @param child TWidget to add
*/
*
* @param child TWidget to add
*/
- p
rivate
void addChild(final TWidget child) {
+ p
ublic
void addChild(final TWidget child) {
children.add(child);
if ((child.enabled)
children.add(child);
if ((child.enabled)