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.db;
 import  com.jgoodies.forms.builder.PanelBuilder;
 import  com.jgoodies.forms.layout.CellConstraints;
 import  com.jgoodies.forms.layout.FormLayout;

Wizard for altering the database to match the data map.
 public class MergerOptionsView extends JDialog {
     protected JTextArea sql;
     protected JButton generateButton;
     protected JButton cancelButton;
     protected JButton saveSqlButton;
     protected Component tables;
     protected JTabbedPane tabs;
     public MergerOptionsView(Component tables) {
         // create widgets
         this. = new JButton("Migrate");
         this. = new JButton("Close");
         this. = new JButton("Save SQL");
         this. = tables;
         this. = new JTabbedPane(.);
         this. = new JTextArea();
         JPanel sqlTextPanel = new JPanel(new BorderLayout());
         sqlTextPanel.add(new JScrollPane(
         CellConstraints cc = new CellConstraints();
         PanelBuilder builder = new PanelBuilder(new FormLayout(
                 "p, 9dlu, p, 3dlu, fill:40dlu:grow"));
         builder.addSeparator("Generated SQL"cc.xywh(1, 3, 1, 1));
         builder.add(sqlTextPanelcc.xy(1, 5));
         .addTab("Operations"new JScrollPane(
         .addTab("Generated SQL"builder.getPanel());
         // we need the right preferred size so that dialog "pack()" produces decent
         // default size...
         .setPreferredSize(new Dimension(600, 350));
         JPanel buttons = new JPanel(new FlowLayout(.));
        Container contentPane = this.getContentPane();
        contentPane.setLayout(new BorderLayout());
    public JButton getCancelButton() {
        return ;
    public JTabbedPane getTabs() {
        return ;
     * public JCheckBox getCreateFK() { return createFK; } public JCheckBox getCreatePK() {
     * return createPK; } public JCheckBox getCreateTables() { return createTables; }
     * public JCheckBox getDropPK() { return dropPK; } public JCheckBox getDropTables() {
     * return dropTables; }
    public JButton getGenerateButton() {
        return ;
    public JButton getSaveSqlButton() {
        return ;
    public JTextArea getSql() {
        return ;
New to GrepCode? Check out our FAQ X