Package kameleon.gui.model

Examples of kameleon.gui.model.Model


   
    final JButton button = new JButton(refreshIcon) ;
    button.setContentAreaFilled(false) ;
    button.setBorder(null) ;
    button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)) ;
    final Model fViewModel = this.model ;
    button.addActionListener(new ActionListener() {       
      @Override
      public void actionPerformed(ActionEvent e) {
        button.setEnabled(false) ;
        fViewModel.fastGeneration(gMessage) ;
      }// actionPerformed(ActionEvent)
    }) ;

    constraints = new GridBagConstraints() ;
    constraints.gridwidth = 2 ;
View Full Code Here


  protected void initializeViews(boolean debugMode)
      throws KameleonException {
    GridBagLayout gridbag = new GridBagLayout() ;
    GridBagConstraints c ;
    this.setLayout(gridbag) ;
    Model model = new Model(debugMode) ;
   
    // Set drag and drop handler
    JComponent cp = (JComponent) this.getContentPane() ;
    cp.setTransferHandler(new FileDragAndDropHandler(model)) ;
   
    // Menu
    this.setJMenuBar(new Menu(model, this)) ;
   
    // Selected file
    c = new GridBagConstraints() ;
    c.gridwidth = 1 ;
    c.gridheight = 1 ;
    c.anchor = GridBagConstraints.NORTH ;
    c.fill = GridBagConstraints.BOTH ;
    c.gridx = 0 ;
    c.gridy = 0 ;
    c.weightx = 0.0 ;
    c.weighty = 0.0 ;
    SelectionView vueSelection = new SelectionView(this,model) ;
    vueSelection.setPreferredSize(new Dimension(350, 120)) ;
    vueSelection.setMinimumSizenew Dimension(350, 120)) ;
    this.add(vueSelection) ;
    gridbag.setConstraints(vueSelection, c) ;

    // Currently selected file format
    c = new GridBagConstraints() ;
    c.gridwidth = 1 ;
    c.gridheight = 1 ;
    c.anchor = GridBagConstraints.NORTH ;
    c.fill = GridBagConstraints.BOTH ;
    c.gridx = 1 ;
    c.gridy = 0 ;
    c.weightx = 0.0 ;
    c.weighty = 0.0 ;
    FormatView vueFormat = new FormatView(model, this) ;
    vueFormat.setPreferredSize(new Dimension(100, 120)) ;
    vueFormat.setMinimumSizenew Dimension(100, 120)) ;
    this.add(vueFormat) ;
    gridbag.setConstraints(vueFormat, c) ;

    // Messages
    c = new GridBagConstraints() ;
    c.gridwidth = GridBagConstraints.REMAINDER ;
    c.gridheight = 3 ;
    c.fill = GridBagConstraints.BOTH ;
    c.gridx = 2 ;
    c.gridy = 0 ;
    c.weightx = 1.0 ;
    c.weighty = 1.0 ;
    ViewMessages vm = new ViewMessages(model) ;
    this.add(vm) ;
    gridbag.setConstraints(vm, c) ;

    // Recent files
    c = new GridBagConstraints() ;
    c.gridwidth = 2 ;
    c.gridheight = 1 ;
    c.weightx = 0.0 ;
    c.weighty = 1.0 ;
    c.gridx = 0 ;
    c.gridy = 1 ;
    c.fill = GridBagConstraints.BOTH ;
    HistoryView vueHistorique = new HistoryView(model, this) ;
    vueHistorique.setPreferredSize(new Dimension(350, 380)) ;
    vueHistorique.setMinimumSizenew Dimension(350, 380)) ;
    this.add(vueHistorique) ;
    gridbag.setConstraints(vueHistorique, c) ;

    // Output format selection
    c = new GridBagConstraints() ;
    c.gridwidth = 2 ;
    c.gridheight = 1 ;
    c.weightx = 0.0 ;
    c.weighty = 0.0 ;
    c.gridx = 0 ;
    c.gridy = 2 ;
    c.fill = GridBagConstraints.BOTH ;
    GenerationView vueGeneration = new GenerationView(model,this) ;
    vueGeneration.setPreferredSize(new Dimension(350, 200)) ;
    vueGeneration.setMinimumSizenew Dimension(350, 200)) ;
    this.add(vueGeneration) ;
    gridbag.setConstraints(vueGeneration, c) ;

    model.notifyLanguageChange() ;
  }// initializeViews(boolean)
View Full Code Here

TOP

Related Classes of kameleon.gui.model.Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.