Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. /
 package org.apache.cayenne.modeler.dialog.codegen;
 import  com.jgoodies.forms.builder.PanelBuilder;
 import  com.jgoodies.forms.layout.CellConstraints;
 import  com.jgoodies.forms.layout.FormLayout;
 public class CustomModePanel extends GeneratorControllerPanel {
     protected JComboBox generationMode;
     protected JComboBox subclassTemplate;
     protected JComboBox superclassTemplate;
     protected JCheckBox pairs;
     protected JComboBox generatorVersion;
     protected JCheckBox overwrite;
     protected JCheckBox usePackagePath;
     protected JTextField outputPattern;
     protected ActionLink manageTemplatesLink;
     public CustomModePanel() {
         this. = new JComboBox();
         this. = new JComboBox();
         this. = new JComboBox();
         this. = new JCheckBox();
         this. = new JComboBox();
         this. = new JCheckBox();
         this. = new JCheckBox();
         this. = new JTextField();
         this. = new ActionLink("Customize Templates...");
         .addChangeListener(new ChangeListener() {
             public void stateChanged(ChangeEvent e) {
         // assemble
         PanelBuilder builder = new PanelBuilder(
                 new FormLayout(
                         "right:70dlu, 3dlu, fill:150dlu:grow, 3dlu, pref",
                         "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p"));
         CellConstraints cc = new CellConstraints();
         builder.addLabel("Output Directory:"cc.xy(1, 1));
         builder.add(cc.xy(3, 1));
         builder.add(cc.xy(5, 1));
         builder.addLabel("Superclass Package:"cc.xy(1, 3));
         builder.add(cc.xy(3, 3));
         builder.addLabel("Generation Mode:"cc.xy(1, 5));
         builder.add(cc.xy(3, 5));
         builder.addLabel("Generator Version:"cc.xy(1, 7));
         builder.add(cc.xy(3, 7));
         builder.addLabel("Subclass Template:"cc.xy(1, 9));
         builder.add(cc.xy(3, 9));
         builder.addLabel("Superclass Template:"cc.xy(1, 11));
         builder.add(cc.xy(3, 11));
        builder.addLabel("Output Pattern:"cc.xy(1, 13));
        builder.add(cc.xy(3, 13));
        builder.addLabel("Make Pairs:"cc.xy(1, 15));
        builder.add(cc.xy(3, 15));
        builder.addLabel("Overwrite Subclasses:"cc.xy(1, 17));
        builder.add(cc.xy(3, 17));
        builder.addLabel("Use Package Path:"cc.xy(1, 19));
        builder.add(cc.xy(3, 19));
        JPanel links = new JPanel(new FlowLayout(.));
        setLayout(new BorderLayout());
        add(builder.getPanel(), .);
    public JComboBox getGenerationMode() {
        return ;
        return ;
    public JComboBox getSubclassTemplate() {
        return ;
    public JComboBox getSuperclassTemplate() {
        return ;
    public JComboBox getGeneratorVersion() {
        return ;
    public JCheckBox getOverwrite() {
        return ;
    public JCheckBox getPairs() {
        return ;
    public JCheckBox getUsePackagePath() {
        return ;
    public JTextField getOutputPattern() {
        return ;
New to GrepCode? Check out our FAQ X