Package com.jgoodies.uif_lite.panel

Examples of com.jgoodies.uif_lite.panel.SimpleInternalFrame


    okButton.setAction(actionOk);
    okButton.setToolTipText("Gera Relat�rio");
    searchToolBar.add(okButton);
 
    panelHead = new SimpleInternalFrame("");
    panelHead.add(getParametersPanel());
    panelHead.setToolBar(searchToolBar);
   
    taskpane.add(panelHead, BorderLayout.CENTER);
   
View Full Code Here


    taskpane = new JXTaskPane();
    taskpane.setTitle("Informa��es");
    taskpane.setIcon(IconFactory.createAbout());
    taskpane.setLayout(new BorderLayout());
   
    panelHead = new SimpleInternalFrame("");
    if (getFilterPanel() != null) {
      panelHead.add(getFilterPanel());
    }
    taskpane.add(panelHead, BorderLayout.CENTER);
   
    mainPanel.add(taskpane, BorderLayout.NORTH);

    tablePanel = new SimpleInternalFrame("");
    tablePanel.setToolBar(tableToolBar);

    for (TableColumn column : tableColumns) {
      getTableModel().getColumnModel().addColumn(column);
    }
View Full Code Here

    okButton.setAction(actionOk);
    okButton.setToolTipText("Gera Relat�rio");
    searchToolBar.add(okButton);
 
    panelHead = new SimpleInternalFrame("");
    panelHead.add(getParametersPanel());
    panelHead.setToolBar(searchToolBar);
   
    taskpane.add(panelHead, BorderLayout.CENTER);
   
View Full Code Here

    taskpane = new JXTaskPane();
    taskpane.setTitle("Informa��es");
    taskpane.setIcon(IconFactory.createAbout());
    taskpane.setLayout(new BorderLayout());
   
    panelHead = new SimpleInternalFrame("");
    if (getFilterPanel() != null) {
      panelHead.add(getFilterPanel());
    }
    taskpane.add(panelHead, BorderLayout.CENTER);
   
    mainPanel.add(taskpane, BorderLayout.NORTH);

    tablePanel = new SimpleInternalFrame("");
    tablePanel.setToolBar(tableToolBar);

    for (TableColumn column : tableColumns) {
      getTableModel().getColumnModel().addColumn(column);
    }
View Full Code Here

    initComponents();

    panelToolBar.add(new CloseButton(this));
    setToolBar(panelToolBar);

    SimpleInternalFrame searchPanel = new SimpleInternalFrame(IconFactory
        .createSearch(), "Pesquisa...");
    JToolBar searchToolBar = new JToolBar();

    JButton filterButton = new JButton();
    actionFilter = new AbstractAction("", IconFactory.createSearch()) {

      private static final long serialVersionUID = 256213712896508104L;

      public void actionPerformed(ActionEvent e) {
        applyFilters();
      }
    };

    filterButton.setAction(actionFilter);
    filterButton.setToolTipText("Filtrar lista");
    searchToolBar.add(filterButton);

    JButton clearButton = new JButton();
    Action actionClear = new AbstractAction("", IconFactory.createClear()) {
      private static final long serialVersionUID = -1822399088483448296L;

      public void actionPerformed(ActionEvent e) {
        editButton.setEnabled(false);
        deleteButton.setEnabled(false);
        table.setFilters(new FilterPipeline());
        clearFilterFields();
      }

    };
    clearButton.setAction(actionClear);
    clearButton.setToolTipText("Limpa filtros da lista");
    searchToolBar.add(clearButton);

    searchPanel.setToolBar(searchToolBar);

    SimpleInternalFrame tablePanel = new SimpleInternalFrame("");

    newButton = new JButton();
    newButton.setAction(getNewAction());
    newButton.setToolTipText("Novo");
    newButton.setIcon(IconFactory.createNew());
    newButton.setText("");
    tableToolBar.add(newButton);

    editButton.setAction(getEditAction());
    editButton.setToolTipText("Modificar");
    editButton.setEnabled(false);
    tableToolBar.add(editButton);

    deleteButton.setAction(getDeleteAction());
    deleteButton.setToolTipText("Remover");
    deleteButton.setEnabled(false);
    tableToolBar.add(deleteButton);

    tableToolBar.addSeparator();

    Action actionRefresh = new AbstractAction("", IconFactory
        .createRefresh()) {

      private static final long serialVersionUID = 6721786157947228534L;

      public void actionPerformed(ActionEvent e) {
        ((SearchTableModel) table.getModel()).refresh();
        clearFilterFields();
        enableButtons(false);
      }
    };
    JButton refreshButton = new JButton();
    refreshButton.setAction(actionRefresh);
    refreshButton.setToolTipText("Atualiza lista");
    tableToolBar.add(refreshButton);

    Action actionSave = new AbstractAction("", IconFactory.createSave()) {
      private static final long serialVersionUID = -6026875243019236791L;

      public void actionPerformed(ActionEvent e) {
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.showSaveDialog(null);
        try {
          String bean = BeanManager
              .parseBeanToXML(((SearchTableModel) table
                  .getModel()).getList());
          FileWriter fileWriter = new FileWriter(fileChooser
              .getSelectedFile());
          fileWriter.write(bean);
          fileWriter.close();
        } catch (IOException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        } catch (SAXException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        } catch (IntrospectionException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        }
      }

    };

    JButton saveButton = new JButton();
    saveButton.setAction(actionSave);
    saveButton.setToolTipText("Salva a lista");
    tableToolBar.add(saveButton);

    Action actionPrint = new AbstractAction("", IconFactory.createPrint()) {

      private static final long serialVersionUID = -6721786157947228534L;

      public void actionPerformed(ActionEvent e) {
        try {
          table.print();
        } catch (PrinterException e1) {
          // TODO desenvolver tratamento de exce��es
          e1.printStackTrace();
        }
      }
    };

    JButton printButton = new JButton();
    printButton.setAction(actionPrint);
    printButton.setToolTipText("Imprimir listagem");
    tableToolBar.add(printButton);

    tableToolBar.addSeparator();

    tablePanel.setToolBar(tableToolBar);

    JSplitPane iPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
        searchPanel, tablePanel);
    iPanel.setOneTouchExpandable(true);

    add(iPanel);

    searchPanel.add(getFilterPanel());

    build();

    for (TableColumn column : tableColumns) {
      getTableModel().getColumnModel().addColumn(column);
    }

    table.setModel(getTableModel());
    table.setColumnControlVisible(true);
    JScrollPane spTable = new JScrollPane(table);

    MouseListener tableMouseListener = new MouseListener() {

      public void mouseClicked(MouseEvent e) {
                int clicks = e.getClickCount();
               
                if (clicks == 1) {
                    enableButtons(table.getSelectedRowCount() == 1);
                    deleteButton.setEnabled(table.getSelectedRowCount() > 0);                   
                } if (clicks == 2) {
                    getEditAction().actionPerformed(null);
                }
      }

      public void mousePressed(MouseEvent e) {
        // TODO Auto-generated method stub

      }

      public void mouseReleased(MouseEvent e) {
        // TODO Auto-generated method stub

      }

      public void mouseEntered(MouseEvent e) {
        // TODO Auto-generated method stub

      }

      public void mouseExited(MouseEvent e) {
        // TODO Auto-generated method stub

      }
    };
    table.addMouseListener(tableMouseListener);
    table.setColumnControlVisible(true);
    table.setHighlighters(new HighlighterPipeline(
        new Highlighter[] { new AlternateRowHighlighter() }));
    tablePanel.add(spTable);

  }
View Full Code Here

  public JXTable getTable() {
    return this.table;
  }

  public Component buildMainPanel() {
    panelHead = new SimpleInternalFrame(IconFactory.createAbout(),
        "Informa��es");

    tablePanel = new SimpleInternalFrame("");

    tablePanel.setToolBar(tableToolBar);

    mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
        panelHead, tablePanel);
View Full Code Here

    taskpane = new JXTaskPane();
    taskpane.setTitle("Informa��es");
    taskpane.setIcon(IconFactory.createAbout());
    taskpane.setLayout(new BorderLayout());

    panelHead = new SimpleInternalFrame("");
    if (getFilterPanel() != null) {
      panelHead.add(getFilterPanel());
    }
    taskpane.add(panelHead, BorderLayout.CENTER);

    mainPanel.add(taskpane, BorderLayout.NORTH);

    tablePanel = new SimpleInternalFrame("");
    tablePanel.setToolBar(tableToolBar);

    for (TableColumn column : tableColumns) {
      getTableModel().getColumnModel().addColumn(column);
    }
View Full Code Here

    initComponents();

    panelToolBar.add(new CloseButton(this));
    setToolBar(panelToolBar);

    SimpleInternalFrame searchPanel = new SimpleInternalFrame(IconFactory
        .createSearch(), "Pesquisa...");
    JToolBar searchToolBar = new JToolBar();

    JButton filterButton = new JButton();
    actionFilter = new AbstractAction("", IconFactory.createSearch()) {

      private static final long serialVersionUID = 256213712896508104L;

      public void actionPerformed(ActionEvent e) {
        applyFilters();
      }
    };

    filterButton.setAction(actionFilter);
    filterButton.setToolTipText("Filtrar lista");
    searchToolBar.add(filterButton);

    JButton clearButton = new JButton();
    Action actionClear = new AbstractAction("", IconFactory.createClear()) {
      private static final long serialVersionUID = -1822399088483448296L;

      public void actionPerformed(ActionEvent e) {
        editButton.setEnabled(false);
        deleteButton.setEnabled(false);
        table.setFilters(new FilterPipeline());
        clearFilterFields();
      }

    };
    clearButton.setAction(actionClear);
    clearButton.setToolTipText("Limpa filtros da lista");
    searchToolBar.add(clearButton);

    searchPanel.setToolBar(searchToolBar);

    SimpleInternalFrame tablePanel = new SimpleInternalFrame("");

    newButton = new JButton();
    newButton.setAction(getNewAction());
    newButton.setToolTipText("Novo");
    newButton.setIcon(IconFactory.createNew());
    newButton.setText("");
    tableToolBar.add(newButton);

    editButton.setAction(getEditAction());
    editButton.setToolTipText("Modificar");
    editButton.setEnabled(false);
    tableToolBar.add(editButton);

    deleteButton.setAction(getDeleteAction());
    deleteButton.setToolTipText("Remover");
    deleteButton.setEnabled(false);
    tableToolBar.add(deleteButton);

    tableToolBar.addSeparator();

    Action actionRefresh = new AbstractAction("", IconFactory
        .createRefresh()) {

      private static final long serialVersionUID = 6721786157947228534L;

      public void actionPerformed(ActionEvent e) {
        ((SearchTableModel) table.getModel()).refresh();
        clearFilterFields();
        enableButtons(false);
      }
    };
    JButton refreshButton = new JButton();
    refreshButton.setAction(actionRefresh);
    refreshButton.setToolTipText("Atualiza lista");
    tableToolBar.add(refreshButton);

    Action actionSave = new AbstractAction("", IconFactory.createSave()) {
      private static final long serialVersionUID = -6026875243019236791L;

      public void actionPerformed(ActionEvent e) {
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.showSaveDialog(null);
        try {
          String bean = BeanManager
              .parseBeanToXML(((SearchTableModel) table
                  .getModel()).getList());
          FileWriter fileWriter = new FileWriter(fileChooser
              .getSelectedFile());
          fileWriter.write(bean);
          fileWriter.close();
        } catch (IOException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        } catch (SAXException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        } catch (IntrospectionException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        }
      }

    };

    JButton saveButton = new JButton();
    saveButton.setAction(actionSave);
    saveButton.setToolTipText("Salva a lista");
    tableToolBar.add(saveButton);

    Action actionPrint = new AbstractAction("", IconFactory.createPrint()) {

      private static final long serialVersionUID = -6721786157947228534L;

      public void actionPerformed(ActionEvent e) {
        try {
          table.print();
        } catch (PrinterException e1) {
          // TODO desenvolver tratamento de exce��es
          e1.printStackTrace();
        }
      }
    };

    JButton printButton = new JButton();
    printButton.setAction(actionPrint);
    printButton.setToolTipText("Imprimir listagem");
    tableToolBar.add(printButton);

    tableToolBar.addSeparator();

    tablePanel.setToolBar(tableToolBar);

    JSplitPane iPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
        searchPanel, tablePanel);
    iPanel.setOneTouchExpandable(true);

    add(iPanel);

    searchPanel.add(getFilterPanel());

    build();

    for (TableColumn column : tableColumns) {
      getTableModel().getColumnModel().addColumn(column);
    }

    table.setModel(getTableModel());
    table.setColumnControlVisible(true);
    JScrollPane spTable = new JScrollPane(table);

    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    table.addMouseListener(getTableMouseListener());
    table.setColumnControlVisible(true);
    table.setHighlighters(new HighlighterPipeline(
        new Highlighter[] { new AlternateRowHighlighter() }));
    tablePanel.add(spTable);

  }
View Full Code Here

TOP

Related Classes of com.jgoodies.uif_lite.panel.SimpleInternalFrame

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.