org.nuiton.jaxx.demo.component.swing.HidorButtonDemo Maven / Gradle / Ivy
package org.nuiton.jaxx.demo.component.swing;
/*-
* #%L
* JAXX :: Demo
* %%
* Copyright (C) 2008 - 2019 Code Lutin, Ultreia.io
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import java.awt.GridLayout;
import java.awt.LayoutManager;
import javax.swing.JLabel;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.nuiton.jaxx.demo.DemoPanel;
import org.nuiton.jaxx.runtime.JAXXContext;
import org.nuiton.jaxx.runtime.JAXXObjectDescriptor;
import org.nuiton.jaxx.runtime.JAXXUtil;
import org.nuiton.jaxx.runtime.swing.HBox;
import org.nuiton.jaxx.widgets.hidor.HidorButton;
import static io.ultreia.java4all.i18n.I18n.t;
public class HidorButtonDemo extends DemoPanel {
/*-----------------------------------------------------------------------*/
/*------------------------- Other static fields -------------------------*/
/*-----------------------------------------------------------------------*/
private static final String $jaxxObjectDescriptor = "H4sIAAAAAAAAAK2US28TMRDHndAkfaVPqBCniAZaXrsU9YJaFfpQFaqUIopQRS44WStx5awX29tsOfTAgRtfgANXLqjfoeKExIVrvwNSPwJjZ5tEUbJNG3LY7Nozv/nPeMY//qKEFOghF2XL9anirrWPg8ASvqtolVhbq3t7O8V9UlIbRJYE9RQXqP6LxVG8gEacxrpUyCrkgWTXSbYm2SHJXudVj7vEbQEt5dGwVIeMyAohSqH5rs4lKe3dhuVS4PkijNVRdadYvz8vnMbIxtc4QoEH8lOQ9oNLAJpZD+RRnDoKTeX38QG2GXbLIE5QtwwJpfXaOsNSvsRV8gEdoVQeJT0sAKbQoyuVx+AMKvAUGslukCp/hV3CHiu02J6CA5tW6ZxmyRrosnLU4WLNV2ClnT3P4JIKJbO5NR4A53a3UoQAsNIuQw3PdLYFCoB77YAadcpESauizVoVaMBoU4HZX4By6soFYbytPC4S1mZptC7or7EILcZgUj9utAV5or+uhzsC3e2WMnSb1ey25sHHCighfFhWaLZ7o+tefQ1W9S6d7d6lOowx/HR8JL7Xzk7PW3McxGUu8mqZQugTT3CPCEW1tvF6X/qKMnsbe0sFNCQJgxE2IzoXrXw3tAT1oGJSkyxNsnJYVoCWSJ2e/Jx5/+caim+iYcaxs4m1/Qs0pCoCKsaZE3jPnhtxo7VBeE5omXAGDB9yOCE0tuxghTNF6jpw1CsBVGkuukoNUcc7Z7++fblzcl6pGGjM9uLZrFbiHUpSl1GXmDEOJ7Tj2I54kvgOb45fp4GM6f9hLxypjHlmO+U/XeGCfuSuwmyV0bJbNTfC1HJdTAYruEKKviJQEM2YN+npt/smRLqHEJMHugdKLQG0qX114CDMDXlDgijORC8c6Ivaf+AkFRZwqej9uatT0nXKWyppkZE+YQMqOq3pCxl62YogzPREWOyb8DSCcLMnwkrfhPWI0+iNkOubsB2RxS0g/AOe7sDjNAkAAA==";
private static final Logger log = LogManager.getLogger(HidorButtonDemo.class);
private static final long serialVersionUID = 1L;
/*-----------------------------------------------------------------------*/
/*------------------------ Protected components ------------------------*/
/*-----------------------------------------------------------------------*/
protected JLabel hidor1;
protected JLabel hidor2;
/*-----------------------------------------------------------------------*/
/*------------------------- Private components -------------------------*/
/*-----------------------------------------------------------------------*/
private HidorButtonDemo $DemoPanel0;
private HBox $HBox0;
private HBox $HBox1;
private HidorButton $HidorButton0;
private HidorButton $HidorButton1;
/*-----------------------------------------------------------------------*/
/*---------------------------- Constructors ----------------------------*/
/*-----------------------------------------------------------------------*/
public HidorButtonDemo(LayoutManager param0, boolean param1) {
super(param0 ,param1);
}
public HidorButtonDemo(JAXXContext param0, LayoutManager param1, boolean param2) {
super(param0 ,param1 ,param2);
}
public HidorButtonDemo(LayoutManager param0) {
super(param0);
}
public HidorButtonDemo(JAXXContext param0, LayoutManager param1) {
super(param0 ,param1);
}
public HidorButtonDemo() {
}
public HidorButtonDemo(JAXXContext param0) {
super(param0);
}
public HidorButtonDemo(boolean param0) {
super(param0);
}
public HidorButtonDemo(JAXXContext param0, boolean param1) {
super(param0 ,param1);
}
/*-----------------------------------------------------------------------*/
/*--------------------------- Statics methods ---------------------------*/
/*-----------------------------------------------------------------------*/
public static JAXXObjectDescriptor $getJAXXObjectDescriptor() {
return JAXXUtil.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor);
}
/*-----------------------------------------------------------------------*/
/*----------------------- Public acessor methods -----------------------*/
/*-----------------------------------------------------------------------*/
public JLabel getHidor1() {
return hidor1;
}
public JLabel getHidor2() {
return hidor2;
}
/*-----------------------------------------------------------------------*/
/*--------------------- Protected acessors methods ---------------------*/
/*-----------------------------------------------------------------------*/
protected HBox get$HBox0() {
return $HBox0;
}
protected HBox get$HBox1() {
return $HBox1;
}
protected HidorButton get$HidorButton0() {
return $HidorButton0;
}
protected HidorButton get$HidorButton1() {
return $HidorButton1;
}
/*-----------------------------------------------------------------------*/
/*--------------------- Components creation methods ---------------------*/
/*-----------------------------------------------------------------------*/
protected void createHidor1() {
$objectMap.put("hidor1", hidor1 = new JLabel());
hidor1.setName("hidor1");
hidor1.setText(t("Label 1"));
}
protected void createHidor2() {
$objectMap.put("hidor2", hidor2 = new JLabel());
hidor2.setName("hidor2");
hidor2.setText(t("Label 2"));
}
/*-----------------------------------------------------------------------*/
/*------------------------ Internal jaxx methods ------------------------*/
/*-----------------------------------------------------------------------*/
@Override
protected void $initialize() {
if (log.isDebugEnabled()) {
log.debug(this);
}
$DemoPanel0 = this;
super.$initialize();
}
@Override
protected void $initialize_01_createComponents() {
if (log.isDebugEnabled()) {
log.debug(this);
}
super.$initialize_01_createComponents();
$objectMap.put("$DemoPanel0", $DemoPanel0);
// inline creation of $HBox0
$objectMap.put("$HBox0", $HBox0 = new HBox());
$HBox0.setName("$HBox0");
$HBox0.setHorizontalAlignment(0);
$HBox0.setVerticalAlignment(0);
// inline creation of $HidorButton0
$objectMap.put("$HidorButton0", $HidorButton0 = new HidorButton());
$HidorButton0.setName("$HidorButton0");
$HidorButton0.setHideText("hide label1");
$HidorButton0.setShowText("show label1");
createHidor1();
// inline creation of $HBox1
$objectMap.put("$HBox1", $HBox1 = new HBox());
$HBox1.setName("$HBox1");
$HBox1.setHorizontalAlignment(0);
$HBox1.setVerticalAlignment(0);
// inline creation of $HidorButton1
$objectMap.put("$HidorButton1", $HidorButton1 = new HidorButton());
$HidorButton1.setName("$HidorButton1");
$HidorButton1.setHideText("hide label2");
$HidorButton1.setShowText("show label2");
createHidor2();
// inline creation of $DemoPanel0
setName("$DemoPanel0");
setLayout(new GridLayout(0,1));
}
@Override
protected void $initialize_02_registerDataBindings() {
if (log.isDebugEnabled()) {
log.debug(this);
}
super.$initialize_02_registerDataBindings();
// register 0 data bindings
}
@Override
protected void $initialize_03_finalizeCreateComponents() {
if (log.isDebugEnabled()) {
log.debug(this);
}
super.$initialize_03_finalizeCreateComponents();
// inline complete setup of $DemoPanel0
add($HBox0);
add($HBox1);
// inline complete setup of $HBox0
$HBox0.add($HidorButton0);
$HBox0.add(hidor1);
// inline complete setup of $HBox1
$HBox1.add($HidorButton1);
$HBox1.add(hidor2);
}
@Override
protected void $initialize_04_applyDataBindings() {
if (log.isDebugEnabled()) {
log.debug(this);
}
super.$initialize_04_applyDataBindings();
}
@Override
protected void $initialize_05_setProperties() {
if (log.isDebugEnabled()) {
log.debug(this);
}
super.$initialize_05_setProperties();
// apply 5 property setters
$HidorButton0.setTarget(hidor1);
$HidorButton0.setTargetVisible(true);
$HidorButton1.setTarget(hidor2);
$HidorButton1.setTargetVisible(false);
}
@Override
protected void $initialize_06_finalizeInitialize() {
if (log.isDebugEnabled()) {
log.debug(this);
}
super.$initialize_06_finalizeInitialize();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy