/*
* Copyright (c) 2010 Bjrn Darri Sigursson
*
* This file is part of Sonav.
*
* Sonav 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 <http://www.gnu.org/licenses/>.
*/
package org.jminor.sonav.beans.ui;
import org.jminor.common.ui.layout.FlexibleGridLayout;
import org.jminor.framework.client.model.EntityEditModel;
import org.jminor.framework.client.ui.EntityEditPanel;
import org.jminor.framework.client.ui.EntityLookupField;
import org.jminor.sonav.domain.Sonav;
import javax.swing.JTextField;
/**
* An edit panel for Rules Parameters.
*/
public final class RuleParameterEditPanel extends EntityEditPanel {
/**
* Instantiates a new RuleParameterEditPanel.
* @param editModel the edit model to base this edit panel on.
*/
public RuleParameterEditPanel(final EntityEditModel editModel) {
super(editModel);
}
/** {@inheritDoc} */
protected void initializeUI() {
setInitialFocusComponentKey(Sonav.RULES_PARAMETERS_RULE_ID_FK);
final EntityLookupField txtRule = createEntityLookupField(Sonav.RULES_PARAMETERS_RULE_ID_FK,
Sonav.RULES_NAME);
txtRule.setColumns(18);
final JTextField txtName = createTextField(Sonav.RULES_PARAMETERS_NAME);
txtName.setColumns(18);
final JTextField txtDescription = createTextField(Sonav.RULES_PARAMETERS_DESCRIPTION);
txtDescription.setColumns(18);
final JTextField txtType = createTextField(Sonav.RULES_PARAMETERS_PARAM_TYPE);
txtType.setColumns(18);
setLayout(new FlexibleGridLayout(4, 1, 5, 5, true, false));
addPropertyPanel(Sonav.RULES_PARAMETERS_RULE_ID_FK);
addPropertyPanel(Sonav.RULES_PARAMETERS_NAME);
addPropertyPanel(Sonav.RULES_PARAMETERS_DESCRIPTION);
addPropertyPanel(Sonav.RULES_PARAMETERS_PARAM_TYPE);
}
}
|