7 changed files with 60 additions and 12 deletions
@ -0,0 +1,24 @@ |
|||
package com.sparrowwallet.sparrow.control; |
|||
|
|||
import tornadofx.control.Form; |
|||
|
|||
public class DynamicForm extends Form { |
|||
private DynamicUpdate dynamicUpdate; |
|||
|
|||
public DynamicForm() { |
|||
super(); |
|||
} |
|||
|
|||
public void setDynamicUpdate(DynamicUpdate dynamicUpdate) { |
|||
this.dynamicUpdate = dynamicUpdate; |
|||
} |
|||
|
|||
@Override |
|||
protected void layoutChildren() { |
|||
if(dynamicUpdate != null) { |
|||
dynamicUpdate.update(); |
|||
} |
|||
|
|||
super.layoutChildren(); |
|||
} |
|||
} |
@ -0,0 +1,5 @@ |
|||
package com.sparrowwallet.sparrow.control; |
|||
|
|||
public interface DynamicUpdate { |
|||
void update(); |
|||
} |
Loading…
Reference in new issue