Thread: [Nextobjects-devel] nextobjects/nextobjects/src/org/devaki/nextobjects NextObjects.java,1.12,1.13
Status: Alpha
Brought to you by:
eflorent
From: <efl...@us...> - 2003-06-02 20:03:49
|
Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects In directory sc8-pr-cvs1:/tmp/cvs-serv28736/src/org/devaki/nextobjects Modified Files: NextObjects.java Log Message: made model -> png about to work again + checkstyleS Index: NextObjects.java =================================================================== RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/NextObjects.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NextObjects.java 28 May 2003 21:48:27 -0000 1.12 --- NextObjects.java 2 Jun 2003 20:03:45 -0000 1.13 *************** *** 21,25 **** package org.devaki.nextobjects; - import java.awt.FlowLayout; import java.awt.GridBagConstraints; --- 21,24 ---- *************** *** 50,54 **** import org.devaki.nextobjects.ui.workspace.models.objects.DataDictionaryEdit; - /* * devaki-nextobjects is an Integrated Development Tool for Entreprise Applications. --- 49,52 ---- *************** *** 59,309 **** */ public class NextObjects extends JFrame { ! /* ! * Reference to the instantiated 'NextObjects' object ! */ ! ! private static NextObjects nextObjects; ! ! /* ! * Logger ! */ ! private static Category logger ! = Logger.getInstance(NextObjects.class.getName()); ! /* ! * Components ! */ ! private static JLabel jLabelStatus = new JLabel(" "); ! /* ! * Components ! */ ! private NOMenuBar menuBar = new NOMenuBar(); ! /* ! * Components ! */ ! private NOToolBar1 toolBar1 = new NOToolBar1(); ! /* ! * Components ! */ ! private NOToolBar2 toolBar2 = new NOToolBar2(); ! // Panels ! private CustomSplitPane jSplitPane1 = ! new CustomSplitPane(JSplitPane.HORIZONTAL_SPLIT, 220); ! /* * Components */ ! private CustomSplitPane jSplitPane2 = ! new CustomSplitPane(JSplitPane.VERTICAL_SPLIT, 0); ! /* * Components */ ! private JPanel jPanelStatusBar = new JPanel(new GridBagLayout()); ! ! /* ! * Thetabbedpane ! */ ! public NOWorkspace nOWorkspace; ! /* ! * The treeview ! */ ! public static DataDictionaryEdit dataDictionaryEdit; ! /* ! * Component spl ! */ ! static SplashScreen splash; ! /* ! * Construct a new 'NextObjects' object ! */ ! public NextObjects() ! { ! super("nextObjects "); ! /** Initialization **/ ! // Initiliaze the local reference of the object ! nextObjects = this; ! // Load the preferences for the current user ! splash.jProgressBar1.setString("Loading properties"); ! NOTools nOTools = new NOTools(); ! splash.jProgressBar1.setValue(5); ! //panel & logging. ! splash.jProgressBar1.setString("Loading logger"); ! NOLog noLog = new NOLog(); ! splash.jProgressBar1.setValue(10); ! splash.jProgressBar1.setString("Loading Data Dictionary"); ! dataDictionaryEdit = new DataDictionaryEdit(); ! splash.jProgressBar1.setValue(15); ! // Define what to do when closing this window ! this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); ! // Set icon for nextObjects ! this.setIconImage(Toolkit.getDefaultToolkit().getImage(org.devaki.nextobjects.NextObjects.class.getResource( ! "/org/devaki/nextobjects/icons/icon.png"))); ! // Set size ! int w=640; ! int h=480; ! try { ! w=Integer.parseInt(NOTools.NO_PROPS.getProperty("width")); ! h=Integer.parseInt(NOTools.NO_PROPS.getProperty("heigth")); ! } catch (Exception e) { ! w=640; ! h=480; ! logger.error("Setting default window size."); ! } ! if (w<10 || h< 10) { h=480; w=480; } ! this.setSize(w,h); ! ! // Create the ModelMan object ! splash.jProgressBar1.setString("Loading Model Manager"); ! ModelMan modelMan = new ModelMan(); ! splash.jProgressBar1.setValue(25); ! // Instantiate static EditorFactory ! splash.jProgressBar1.setString("Loading Object's Editors"); ! EditorFactory editorFactory = new EditorFactory(); ! splash.jProgressBar1.setValue(50); ! // Create the InitHome object ! splash.jProgressBar1.setString("Checking User Installation"); ! InitHome initHome = new InitHome(); ! splash.jProgressBar1.setValue(60); ! initHome.checkForTorque(); ! // Dereference the 'InitHome' object in order it to be garbage collected ! initHome = null; ! /** Components **/ ! // PANELS ! // Define a grid bag layout for the main panel ! this.getContentPane().setLayout(new GridBagLayout()); ! // Set divider location of the horizontal split panel ! jSplitPane2.setDividerLocation((int)this.getSize().getHeight() - 220); ! /** Listeners **/ ! // WINDOW ! this.addWindowListener(new WindowAdapter() ! { ! // Define what to do when closing nextObjects ! public void windowClosing(WindowEvent evt) { ModelMan.goodbye(); } ! }); ! /** Assembling components **/ ! // Define the nextObjects menu bar ! splash.jProgressBar1.setString("Building Menu Bars"); ! this.setJMenuBar(this.menuBar); ! splash.jProgressBar1.setValue(70); ! // 'jSplitPane1' ! splash.jProgressBar1.setString("Building Tree View"); ! this.jSplitPane1.setLeftComponent(new NOTreeView()); ! splash.jProgressBar1.setValue(80); ! splash.jProgressBar1.setString("Building Workspace"); ! nOWorkspace= new NOWorkspace(); ! this.jSplitPane1.setRightComponent(nOWorkspace); ! splash.jProgressBar1.setValue(90); ! splash.jProgressBar1.setString("Building Toolbars"); ! // 'jSplitPane2' ! this.jSplitPane2.setTopComponent(this.jSplitPane1); ! this.jSplitPane2.setBottomComponent(noLog); ! // 'jPanelStatusBar' ! this.jPanelStatusBar.add(jLabelStatus, ! new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(0, 0, 0, 0), 0, 0)); ! // Content Panel ! JPanel toolbarPanel=new JPanel(); ! toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); ! toolbarPanel.add(toolBar1); ! toolbarPanel.add(toolBar2); ! this.getContentPane().add(toolbarPanel, ! new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(0, 0, 0, 0), 0, 0)); ! this.getContentPane().add(this.jSplitPane2, ! new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(0, 0, 0, 0), 0, 0)); ! this.getContentPane().add(this.jPanelStatusBar, ! new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(0, 0, 0, 0), 0, 0)); ! NOToolBar1.fixIcons(); ! //SwingUtilities.updateComponentTreeUI(this); ! splash.jProgressBar1.setString("Done"); ! splash.jProgressBar1.setValue(98); ! this.setVisible(true); ! System.gc(); ! logger.info(" _"); ! logger.info("| \\ , _Nextobjects_ O"); ! logger.info("| ] | -_) v / _| |//| |"); ! logger.info("|__/ \\__|\\_/\\__|_|\\\\|_|"); ! splash.jProgressBar1.setValue(100); ! } // End of 'NextObjects()' ! /** ! * main function : nextObjects launcher ! * @param args Arguments passed to the launcher ! */ ! public static void main(String [] args) ! { ! // Create the 'SplashScreen' object ! splash = new SplashScreen(); ! // Make the splash appear ! splash.setVisible(true); ! // Create the 'NextObjects' object and make it appear ! new NextObjects(); ! // Make the splash screen disappear ! splash.setVisible(false); ! // Prepare the splash screen memory range to be garbage collected ! // by dereferencing the 'SplashScreen' object ! splash = null; ! } // End of 'main' ! /** ! * Return a reference to the 'NextObjects' object ! * @return The 'NextObjects' object ! */ ! public static NextObjects getReference() { return nextObjects; } ! /** ! * Return a reference to the 'NextObjects' object ! * @return The 'NextObjects' object ! */ ! public static DataDictionaryEdit getDataDictionaryEdit() ! { ! return dataDictionaryEdit; ! } ! /** ! * Change the text in the status bar ! * @param text Text to display ! */ ! public static void setStatusBarText(String text) ! { ! jLabelStatus.setText(text); ! } } --- 57,365 ---- */ + /** + * Nextobjects is an Integrated Development Tool for Entreprise Applications. + * Nextobjects will help you choose database structure from system analysis + * and design, down to generating strongly designed data layer Object Model. + * + * @author efl...@de... + */ public class NextObjects extends JFrame { ! /** ! * Reference to the instantiated 'NextObjects' object ! */ ! private static NextObjects nextObjects; ! /** ! * Logger ! */ ! private static Category logger = ! Logger.getInstance(NextObjects.class.getName()); ! ! /** ! * Component ! */ ! private static JLabel jLabelStatus = new JLabel(" "); ! /** * Components */ ! private NOMenuBar menuBar = new NOMenuBar(); ! ! /** * Components */ ! private NOToolBar1 toolBar1 = new NOToolBar1(); ! /** ! * Components ! */ ! private NOToolBar2 toolBar2 = new NOToolBar2(); ! /** ! * Components ! */ ! private CustomSplitPane jSplitPane1 = ! new CustomSplitPane(JSplitPane.HORIZONTAL_SPLIT, 220); ! /** ! * Components ! */ ! private CustomSplitPane jSplitPane2 = ! new CustomSplitPane(JSplitPane.VERTICAL_SPLIT, 0); ! /** ! * Components ! */ ! private JPanel jPanelStatusBar = new JPanel(new GridBagLayout()); ! /** ! * Thetabbedpane ! */ ! public NOWorkspace nOWorkspace; + /** + * The treeview + */ + public static DataDictionaryEdit dataDictionaryEdit; ! /** ! * Component spl ! */ ! private static SplashScreen splash; ! /** ! * Construct a new 'NextObjects' object ! */ ! public NextObjects() ! { ! super("nextObjects "); ! /** Initialization **/ ! // Initiliaze the local reference of the object ! nextObjects = this; ! // Load the preferences for the current user ! splash.jProgressBar1.setString("Loading properties"); ! NOTools nOTools = new NOTools(); ! splash.jProgressBar1.setValue(5); ! //panel & logging. ! splash.jProgressBar1.setString("Loading logger"); ! NOLog noLog = new NOLog(); ! splash.jProgressBar1.setValue(10); ! splash.jProgressBar1.setString("Loading Data Dictionary"); ! dataDictionaryEdit = new DataDictionaryEdit(); ! splash.jProgressBar1.setValue(15); ! // Define what to do when closing this window ! this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); ! // Set icon for nextObjects ! this.setIconImage( ! Toolkit.getDefaultToolkit().getImage( ! org.devaki.nextobjects.NextObjects.class.getResource( ! "/org/devaki/nextobjects/icons/icon.png"))); ! // Set size ! int w = 640; ! int h = 480; ! try ! { ! w = Integer.parseInt(NOTools.NO_PROPS.getProperty("width")); ! h = Integer.parseInt(NOTools.NO_PROPS.getProperty("heigth")); ! } catch (Exception e) ! { ! w = 640; ! h = 480; ! logger.error("Setting default window size."); ! } ! if (w < 10 || h < 10) ! { ! h = 480; ! w = 480; ! } ! this.setSize(w, h); ! // Create the ModelMan object ! splash.jProgressBar1.setString("Loading Model Manager"); ! ModelMan modelMan = new ModelMan(); ! splash.jProgressBar1.setValue(25); ! // Instantiate static EditorFactory ! splash.jProgressBar1.setString("Loading Object's Editors"); ! EditorFactory editorFactory = new EditorFactory(); ! splash.jProgressBar1.setValue(50); ! // Create the InitHome object ! splash.jProgressBar1.setString("Checking User Installation"); ! InitHome initHome = new InitHome(); ! splash.jProgressBar1.setValue(60); ! initHome.checkForTorque(); ! // Dereference the 'InitHome' object in order it to be garbage collected ! initHome = null; ! /** Components **/ ! // PANELS ! // Define a grid bag layout for the main panel ! this.getContentPane().setLayout(new GridBagLayout()); ! // Set divider location of the horizontal split panel ! jSplitPane2.setDividerLocation((int) this.getSize().getHeight() - 220); ! /** Listeners **/ ! // WINDOW ! this.addWindowListener(new WindowAdapter() ! { ! // Define what to do when closing nextObjects ! public void windowClosing(WindowEvent evt) ! { ! ModelMan.goodbye(); ! } ! }); ! /** Assembling components **/ + // Define the nextObjects menu bar + splash.jProgressBar1.setString("Building Menu Bars"); + this.setJMenuBar(this.menuBar); + splash.jProgressBar1.setValue(70); + // 'jSplitPane1' + splash.jProgressBar1.setString("Building Tree View"); + this.jSplitPane1.setLeftComponent(new NOTreeView()); + splash.jProgressBar1.setValue(80); + splash.jProgressBar1.setString("Building Workspace"); + nOWorkspace = new NOWorkspace(); + this.jSplitPane1.setRightComponent(nOWorkspace); + splash.jProgressBar1.setValue(90); + splash.jProgressBar1.setString("Building Toolbars"); + // 'jSplitPane2' + this.jSplitPane2.setTopComponent(this.jSplitPane1); + this.jSplitPane2.setBottomComponent(noLog); + // 'jPanelStatusBar' + this.jPanelStatusBar.add( + jLabelStatus, + new GridBagConstraints( + 0, + 0, + 1, + 1, + 1.0, + 0.0, + GridBagConstraints.CENTER, + GridBagConstraints.HORIZONTAL, + new Insets(0, 0, 0, 0), + 0, + 0)); ! // Content Panel ! JPanel toolbarPanel = new JPanel(); ! toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); ! toolbarPanel.add(toolBar1); ! toolbarPanel.add(toolBar2); ! this.getContentPane().add( ! toolbarPanel, ! new GridBagConstraints( ! 0, ! 0, ! 1, ! 1, ! 1.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(0, 0, 0, 0), ! 0, ! 0)); ! this.getContentPane().add( ! this.jSplitPane2, ! new GridBagConstraints( ! 0, ! 1, ! 1, ! 1, ! 1.0, ! 1.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.BOTH, ! new Insets(0, 0, 0, 0), ! 0, ! 0)); ! this.getContentPane().add( ! this.jPanelStatusBar, ! new GridBagConstraints( ! 0, ! 2, ! 1, ! 1, ! 0.0, ! 0.0, ! GridBagConstraints.CENTER, ! GridBagConstraints.HORIZONTAL, ! new Insets(0, 0, 0, 0), ! 0, ! 0)); ! NOToolBar1.fixIcons(); ! //SwingUtilities.updateComponentTreeUI(this); ! splash.jProgressBar1.setString("Done"); ! splash.jProgressBar1.setValue(98); ! this.setVisible(true); ! System.gc(); ! logger.info(" _"); ! logger.info("| \\ , _Nextobjects_ O"); ! logger.info("| ] | -_) v / _| |//| |"); ! logger.info("|__/ \\__|\\_/\\__|_|\\\\|_|"); ! splash.jProgressBar1.setValue(100); ! } // End of 'NextObjects()' ! /** ! * main function : nextObjects launcher ! * @param args Arguments passed to the launcher ! */ ! public static void main(String[] args) ! { ! // Create the 'SplashScreen' object ! splash = new SplashScreen(); ! // Make the splash appear ! splash.setVisible(true); ! // Create the 'NextObjects' object and make it appear ! new NextObjects(); + // Make the splash screen disappear + splash.setVisible(false); ! // Prepare the splash screen memory range to be garbage collected ! // by dereferencing the 'SplashScreen' object ! splash = null; ! } // End of 'main' ! /** ! * Return a reference to the 'NextObjects' object ! * @return The 'NextObjects' object ! */ ! public static NextObjects getReference() ! { ! return nextObjects; ! } ! /** ! * Return a reference to the 'NextObjects' object ! * @return The 'NextObjects' object ! */ ! public static DataDictionaryEdit getDataDictionaryEdit() ! { ! return dataDictionaryEdit; ! } ! ! /** ! * Change the text in the status bar ! * @param text Text to display ! */ ! public static void setStatusBarText(String text) ! { ! jLabelStatus.setText(text); ! } } |