All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.ird.observe.client.form.FormUI Maven / Gradle / Ivy

package fr.ird.observe.client.form;

/*-
 * #%L
 * ObServe Toolkit :: Common Client
 * %%
 * Copyright (C) 2008 - 2017 IRD, Ultreia.io
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 Public License for more details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this program.  If not, see
 * .
 * #L%
 */

import fr.ird.observe.client.MainUI;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTable;
import javax.swing.JToolBar;
import javax.swing.UIManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.jxlayer.JXLayer;
import org.jdesktop.swingx.JXTitledPanel;
import org.nuiton.jaxx.runtime.JAXXBinding;
import org.nuiton.jaxx.runtime.JAXXContext;
import org.nuiton.jaxx.runtime.JAXXObject;
import org.nuiton.jaxx.runtime.JAXXObjectDescriptor;
import org.nuiton.jaxx.runtime.JAXXUtil;
import org.nuiton.jaxx.runtime.binding.DefaultJAXXBinding;
import org.nuiton.jaxx.runtime.context.DefaultJAXXContext;
import org.nuiton.jaxx.runtime.swing.SwingUtil;
import org.nuiton.jaxx.runtime.swing.Table;
import org.nuiton.jaxx.validator.swing.SwingValidatorMessageTableModel;
import static org.nuiton.i18n.I18n.t;

public abstract class FormUI extends JXTitledPanel implements JAXXObject {

    /*-----------------------------------------------------------------------*/
    /*------------------ Constants for all public bindings ------------------*/
    /*-----------------------------------------------------------------------*/

    public static final String BINDING_BLOCK_LAYER_UI_BLOCK = "blockLayerUI.block";
    public static final String BINDING_SHOW_TECHNICAL_INFORMATIONS_ENABLED = "showTechnicalInformations.enabled";
    public static final String BINDING_TITLE_LEFT_ICON = "titleLeft.icon";
    public static final String BINDING_TITLE_LEFT_TEXT = "titleLeft.text";

    /*-----------------------------------------------------------------------*/
    /*------------------------- Other static fields -------------------------*/
    /*-----------------------------------------------------------------------*/

    private static final String $jaxxObjectDescriptor = "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";
    private static final Log log = LogFactory.getLog(FormUI.class);
    private static final long serialVersionUID = 1L;

    /*-----------------------------------------------------------------------*/
    /*--------------------------- Internal states ---------------------------*/
    /*-----------------------------------------------------------------------*/

    protected List $activeBindings = new ArrayList();
    protected Map $bindingSources = new HashMap();
    protected final Map $bindings = new TreeMap();
    protected Map $objectMap = new HashMap();
    protected Map $previousValues = new HashMap();
    protected final JAXXContext delegateContext = new DefaultJAXXContext();

    /*-----------------------------------------------------------------------*/
    /*------------------------ Protected components  ------------------------*/
    /*-----------------------------------------------------------------------*/

    protected JButton actionDown;
    protected JXLayer actionDownPane;
    protected JButton actionUp;
    protected JXLayer actionUpPane;
    protected Table actions;
    protected FormUIBlockingLayerUI blockLayerUI;
    protected JPanel body;
    protected JPanel bodyContent;
    protected JTable errorTable;
    protected SwingValidatorMessageTableModel errorTableModel;
    protected JPanel invisible;
    protected MainUI mainUI;
    protected FormUIModel model;
    protected JSplitPane rootPanel;
    protected JButton showTechnicalInformations;
    protected JLabel titleLeft;
    protected JLabel titleRight;
    protected JToolBar titleRightToolBar;

    /*-----------------------------------------------------------------------*/
    /*------------------------- Private components  -------------------------*/
    /*-----------------------------------------------------------------------*/

    private JScrollPane $JScrollPane0;
    private JXLayer $JXLayer0;
    private FormUI $JXTitledPanel0;

    /*-----------------------------------------------------------------------*/
    /*---------------------- Raw body code from script ----------------------*/
    /*-----------------------------------------------------------------------*/

    public Object getSelectedBean(JComboBox combo) {
        return combo.getSelectedItem();
    }
    
    public Object getSelectedBean(JList list) {
        return list.getSelectedValue();
    }
    
    public void open() {
        getHandler().openUI();
    }
    
    public boolean close() {
        return getHandler().closeUI();
    }
    
    public void destroy() {
        getHandler().destroyUI();
    }

    /*-----------------------------------------------------------------------*/
    /*---------------------------- Constructors  ----------------------------*/
    /*-----------------------------------------------------------------------*/

    public FormUI(String param0) {
        super(param0);
        $initialize();
    }

    public FormUI(JAXXContext parentContext, String param1) {
        super(param1);
        JAXXUtil.initContext(this, parentContext);
        $initialize();
    }

    public FormUI(String param0, Container param1) {
        super(param0 ,param1);
        $initialize();
    }

    public FormUI(JAXXContext parentContext, String param1, Container param2) {
        super(param1 ,param2);
        JAXXUtil.initContext(this, parentContext);
        $initialize();
    }

    public FormUI() {
        $initialize();
    }

    public FormUI(JAXXContext parentContext) {
        JAXXUtil.initContext(this, parentContext);
        $initialize();
    }

    /*-----------------------------------------------------------------------*/
    /*--------------------------- Statics methods ---------------------------*/
    /*-----------------------------------------------------------------------*/

    public static JAXXObjectDescriptor $getJAXXObjectDescriptor() {
        return JAXXUtil.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor);
    }

    /*-----------------------------------------------------------------------*/
    /*---------------------- JAXXObject implementation ----------------------*/
    /*-----------------------------------------------------------------------*/

    @Override
    public void applyDataBinding(String $binding) {
        if ($bindings.containsKey($binding)) {
            getDataBinding($binding).applyDataBinding();
        }
        processDataBinding($binding);
    }

    @Override
    public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
        super.firePropertyChange(propertyName, oldValue, newValue);
    }

    @Override
    public Map get$objectMap() {
        return $objectMap;
    }

    @Override
    public JAXXBinding getDataBinding(String bindingId) {
        return $bindings.get(bindingId);
    }

    @Override
    public JAXXBinding[] getDataBindings() {
        return $bindings.values().toArray(new JAXXBinding[$bindings.size()]);
    }

    @Override
    public Object getObjectById(String id) {
        return $objectMap.get(id);
    }

    @Override
    public void processDataBinding(String $binding, boolean $force) {
        if (!$force && $activeBindings.contains($binding)) { 
            return;
        }
        $activeBindings.add($binding);
        try {
            if ($bindings.containsKey($binding)) {
                getDataBinding($binding).processDataBinding();
            }
        } finally {
            $activeBindings.remove($binding);
        }
    }

    @Override
    public void processDataBinding(String $binding) {
        processDataBinding($binding, false);
    }

    @Override
    public void registerDataBinding(JAXXBinding binding) {
        $bindings.put(binding.getId(), binding);
    }

    @Override
    public void removeDataBinding(String $binding) {
        if ($bindings.containsKey($binding)) {
            getDataBinding($binding).removeDataBinding();
        }
    }

    /*-----------------------------------------------------------------------*/
    /*--------------------- JAXXContext implementation  ---------------------*/
    /*-----------------------------------------------------------------------*/

    @Override
    public  T getContextValue(Class clazz) {
        return delegateContext.getContextValue(clazz, null);
    }

    @Override
    public  T getContextValue(Class clazz, String name) {
        return delegateContext.getContextValue(clazz, name);
    }

    @Override
    public JAXXContext getDelegateContext() {
        return delegateContext;
    }

    @Override
    public  O getParentContainer(Class clazz) {
        return SwingUtil.getParentContainer(this, clazz);
    }

    @Override
    public  O getParentContainer(Object source, Class clazz) {
        return SwingUtil.getParentContainer(source, clazz);
    }

    @Override
    public  void removeContextValue(Class clazz) {
        delegateContext.removeContextValue(clazz, null);
    }

    @Override
    public  void removeContextValue(Class clazz, String name) {
        delegateContext.removeContextValue(clazz, name);
    }

    @Override
    public  void setContextValue(T o) {
        delegateContext.setContextValue(o, null);
    }

    @Override
    public  void setContextValue(T o, String name) {
        delegateContext.setContextValue(o, name);
    }

    /*-----------------------------------------------------------------------*/
    /*----------------------- Public acessor methods  -----------------------*/
    /*-----------------------------------------------------------------------*/

    public JButton getActionDown() {
        return actionDown;
    }

    public JXLayer getActionDownPane() {
        return actionDownPane;
    }

    public JButton getActionUp() {
        return actionUp;
    }

    public JXLayer getActionUpPane() {
        return actionUpPane;
    }

    public Table getActions() {
        return actions;
    }

    public FormUIBlockingLayerUI getBlockLayerUI() {
        return blockLayerUI;
    }

    public JPanel getBody() {
        return body;
    }

    public JPanel getBodyContent() {
        return bodyContent;
    }

    public JTable getErrorTable() {
        return errorTable;
    }

    public SwingValidatorMessageTableModel getErrorTableModel() {
        return errorTableModel;
    }

    public abstract FormUIHandler getHandler();

    public JPanel getInvisible() {
        return invisible;
    }

    public MainUI getMainUI() {
        return mainUI;
    }

    public FormUIModel getModel() {
        return model;
    }

    public JSplitPane getRootPanel() {
        return rootPanel;
    }

    public JButton getShowTechnicalInformations() {
        return showTechnicalInformations;
    }

    public JLabel getTitleLeft() {
        return titleLeft;
    }

    public JLabel getTitleRight() {
        return titleRight;
    }

    public JToolBar getTitleRightToolBar() {
        return titleRightToolBar;
    }

    /*-----------------------------------------------------------------------*/
    /*--------------------- Protected acessors methods  ---------------------*/
    /*-----------------------------------------------------------------------*/

    protected JScrollPane get$JScrollPane0() {
        return $JScrollPane0;
    }

    protected JXLayer get$JXLayer0() {
        return $JXLayer0;
    }

    /*-----------------------------------------------------------------------*/
    /*--------------------- Components creation methods ---------------------*/
    /*-----------------------------------------------------------------------*/

    protected void addChildrenToActionDownPane() {
        actionDownPane.setView(actionDown);
    }

    protected void addChildrenToActionUpPane() {
        actionUpPane.setView(actionUp);
    }

    protected void addChildrenToBodyContent() {
        bodyContent.add($JXLayer0, BorderLayout.CENTER);
        bodyContent.add(actions, BorderLayout.SOUTH);
    }

    protected void addChildrenToRootPanel() {
        rootPanel.add(bodyContent, JSplitPane.LEFT);
        rootPanel.add($JScrollPane0, JSplitPane.RIGHT);
    }

    protected void addChildrenToTitleRightToolBar() {
        titleRightToolBar.add(actionUpPane);
        titleRightToolBar.add(actionDownPane);
        titleRightToolBar.add(showTechnicalInformations);
        titleRightToolBar.add(titleRight);
    }

    protected void createActionDown() {
        $objectMap.put("actionDown", actionDown = new JButton());
        
        actionDown.setName("actionDown");
        actionDown.putClientProperty("protectFocus", true);
    }

    protected void createActionDownPane() {
        $objectMap.put("actionDownPane", actionDownPane = new JXLayer());
        
        actionDownPane.setName("actionDownPane");
        actionDownPane.putClientProperty("original", true);
    }

    protected void createActionUp() {
        $objectMap.put("actionUp", actionUp = new JButton());
        
        actionUp.setName("actionUp");
        actionUp.putClientProperty("protectFocus", true);
    }

    protected void createActionUpPane() {
        $objectMap.put("actionUpPane", actionUpPane = new JXLayer());
        
        actionUpPane.setName("actionUpPane");
        actionUpPane.putClientProperty("original", true);
    }

    protected void createActions() {
        $objectMap.put("actions", actions = new Table());
        
        actions.setName("actions");
    }

    protected void createBlockLayerUI() {
        $objectMap.put("blockLayerUI", blockLayerUI = new FormUIBlockingLayerUI(this));
        
        blockLayerUI.setUseIcon(false);
    }

    protected void createBody() {
        $objectMap.put("body", body = new JPanel());
        
        body.setName("body");
    }

    protected void createBodyContent() {
        $objectMap.put("bodyContent", bodyContent = new JPanel());
        
        bodyContent.setName("bodyContent");
        bodyContent.setLayout(new BorderLayout());
    }

    protected void createErrorTable() {
        $objectMap.put("errorTable", errorTable = new JTable());
        
        errorTable.setName("errorTable");
        errorTable.setAutoResizeMode(2);
        errorTable.setRowSelectionAllowed(true);
        errorTable.setAutoCreateRowSorter(true);
        errorTable.setCellSelectionEnabled(false);
        errorTable.setSelectionMode(0);
    }

    protected void createErrorTableModel() {
        $objectMap.put("errorTableModel", errorTableModel = new SwingValidatorMessageTableModel());
    }

    protected void createInvisible() {
        $objectMap.put("invisible", invisible = new JPanel());
        
        invisible.setName("invisible");
        invisible.setVisible(false);
    }

    protected void createMainUI() {
        $objectMap.put("mainUI", mainUI = getContextValue(MainUI.class));
    }

    protected void createModel() {
        $objectMap.put("model", model = getContextValue(FormUIModel.class));
    }

    protected void createRootPanel() {
        $objectMap.put("rootPanel", rootPanel = new JSplitPane());
        
        rootPanel.setName("rootPanel");
        rootPanel.setResizeWeight(0.8);
    }

    protected void createShowTechnicalInformations() {
        $objectMap.put("showTechnicalInformations", showTechnicalInformations = new JButton());
        
        showTechnicalInformations.setName("showTechnicalInformations");
        showTechnicalInformations.setBorderPainted(false);
        showTechnicalInformations.setFocusPainted(false);
        showTechnicalInformations.putClientProperty("original", true);
    }

    protected void createTitleLeft() {
        $objectMap.put("titleLeft", titleLeft = new JLabel());
        
        titleLeft.setName("titleLeft");
    }

    protected void createTitleRight() {
        $objectMap.put("titleRight", titleRight = new JLabel());
        
        titleRight.setName("titleRight");
        titleRight.putClientProperty("original", true);
    }

    protected void createTitleRightToolBar() {
        $objectMap.put("titleRightToolBar", titleRightToolBar = new JToolBar());
        
        titleRightToolBar.setName("titleRightToolBar");
        titleRightToolBar.setBorderPainted(false);
        titleRightToolBar.setOpaque(false);
        titleRightToolBar.setFloatable(false);
    }

    /*-----------------------------------------------------------------------*/
    /*------------------------ Internal jaxx methods ------------------------*/
    /*-----------------------------------------------------------------------*/

    protected void $initialize() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
        $JXTitledPanel0 = this;
        $initialize_01_createComponents();
        $initialize_02_registerDataBindings();
        $initialize_03_finalizeCreateComponents();
        $initialize_04_applyDataBindings();
        $initialize_05_setProperties();
        $initialize_06_finalizeInitialize();
    }

    protected void $initialize_01_createComponents() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
        $objectMap.put("$JXTitledPanel0", $JXTitledPanel0);
        createMainUI();
        createErrorTableModel();
        createModel();
        createBlockLayerUI();
        createTitleLeft();
        createTitleRightToolBar();
        createActionUpPane();
        createActionUp();
        createActionDownPane();
        createActionDown();
        createShowTechnicalInformations();
        createTitleRight();
        createRootPanel();
        createBodyContent();
        // inline creation of $JXLayer0
        $objectMap.put("$JXLayer0", $JXLayer0 = new JXLayer());
        
        $JXLayer0.setName("$JXLayer0");
        createBody();
        createActions();
        // inline creation of $JScrollPane0
        $objectMap.put("$JScrollPane0", $JScrollPane0 = new JScrollPane());
        
        $JScrollPane0.setName("$JScrollPane0");
        createErrorTable();
        createInvisible();
        // inline creation of $JXTitledPanel0
        setName("$JXTitledPanel0");
    }

    protected void $initialize_02_registerDataBindings() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
        // register 4 data bindings
        registerDataBinding(new DefaultJAXXBinding(this, BINDING_BLOCK_LAYER_UI_BLOCK, true, true) {
        
            @Override
            public void applyDataBinding() {
                if (body != null) {
                    $bindingSources.put("body", body);
                    body.addComponentListener( JAXXUtil.getEventListener(ComponentListener.class, this, "$pr$u0"));
                }
                if (model != null) {
                    model.addPropertyChangeListener("enabled", this);
                }
            }
        
            @Override
            public void processDataBinding() {
                if (body != null && model != null) {
                    blockLayerUI.setBlock(body.isVisible() && !model.isEnabled());
                }
            }
        
            @Override
            public void removeDataBinding() {
                if (body != null) {
                    JPanel $target = (JPanel) $bindingSources.remove("body");
                    if ($target != null) {
                        $target.removeComponentListener( JAXXUtil.getEventListener(ComponentListener.class, this, "$pr$u0"));
                    }
                }
                if (model != null) {
                    model.removePropertyChangeListener("enabled", this);
                }
            }
        
            public void $pr$u0(ComponentEvent event) {
                if (log.isDebugEnabled()) {
                    log.debug(event);
                }
                propertyChange(null);
            }
        });
        registerDataBinding(new DefaultJAXXBinding(this, BINDING_TITLE_LEFT_ICON, true) {
        
            @Override
            public void applyDataBinding() {
                if (model != null) {
                    model.addPropertyChangeListener("contentIcon", this);
                }
            }
        
            @Override
            public void processDataBinding() {
                if (model != null) {
                    titleLeft.setIcon(model.getContentIcon());
                }
            }
        
            @Override
            public void removeDataBinding() {
                if (model != null) {
                    model.removePropertyChangeListener("contentIcon", this);
                }
            }
        });
        registerDataBinding(new DefaultJAXXBinding(this, BINDING_TITLE_LEFT_TEXT, true) {
        
            @Override
            public void applyDataBinding() {
                if (model != null) {
                    model.addPropertyChangeListener("title", this);
                }
            }
        
            @Override
            public void processDataBinding() {
                if (model != null) {
                    titleLeft.setText(t(model.getTitle()));
                }
            }
        
            @Override
            public void removeDataBinding() {
                if (model != null) {
                    model.removePropertyChangeListener("title", this);
                }
            }
        });
        registerDataBinding(new DefaultJAXXBinding(this, BINDING_SHOW_TECHNICAL_INFORMATIONS_ENABLED, true) {
        
            @Override
            public void applyDataBinding() {
                if (model != null) {
                    model.addPropertyChangeListener("creatingMode", this);
                }
            }
        
            @Override
            public void processDataBinding() {
                if (model != null) {
                    showTechnicalInformations.setEnabled(!model.isCreatingMode());
                }
            }
        
            @Override
            public void removeDataBinding() {
                if (model != null) {
                    model.removePropertyChangeListener("creatingMode", this);
                }
            }
        });
    }

    protected void $initialize_03_finalizeCreateComponents() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
        // inline complete setup of $JXTitledPanel0
        add(titleLeft);
        add(titleRightToolBar);
        add(rootPanel);
        add(invisible);
        addChildrenToTitleRightToolBar();
        addChildrenToActionUpPane();
        addChildrenToActionDownPane();
        addChildrenToRootPanel();
        addChildrenToBodyContent();
        // inline complete setup of $JXLayer0
        $JXLayer0.setView(body);
        // inline complete setup of $JScrollPane0
        $JScrollPane0.getViewport().add(errorTable);
    }

    protected void $initialize_04_applyDataBindings() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
        
        // apply 4 data bindings
        JAXXUtil.applyDataBinding(this, $bindings.keySet());
    }

    protected void $initialize_05_setProperties() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
        
        // apply 10 property setters
        setContentContainer(rootPanel);
        setLeftDecoration(titleLeft);
        setRightDecoration(titleRightToolBar);
        $JXLayer0.setUI(blockLayerUI);
        $JScrollPane0.setMinimumSize(new Dimension(0,150));
        blockLayerUI.setAcceptedComponentTypes(javax.swing.JScrollBar.class);
        blockLayerUI.setBlockingColor(javax.swing.UIManager.getColor("BlockingLayerUI.blockingColor"));
        rootPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
        errorTable.setModel(errorTableModel);
    }

    protected void $initialize_06_finalizeInitialize() {
        if (log.isDebugEnabled()) {
            log.debug(this);
        }
    }

}