I In certain cases, you may want to extend the default functions of the UI components or make custom changes. To do so, you can derive from the standard components. The new UI component can then be used in the GUI Builder.
A new UI component of type XdevButton is generated.
package com.company.example.ui; import com.xdev.ui.XdevButton; public class MyButton extends XdevButton { /** * */ public MyButton() { super(); this.initUI(); } /* * WARNING: Do NOT edit!<br>The content of this method is always regenerated * by the UI designer. */ // <generated-code name="initUI"> private void initUI() { this.setCaption("Button"); this.setSizeUndefined(); } // </generated-code> } |
The new UI component can be enhanced with any new properties and methods.
Define a new property; e.g., MouseOverCaption.
String MouseOverCaption = ""; public String getMouseOverCaption() { return MouseOverCaption; } public void setMouseOverCaption(String mouseOverCaption) { MouseOverCaption = mouseOverCaption; } |
The new UI component can be used in the GUI Builder in the same way as any other UI component.