Search in sources :

Example 1 with LoboPanel

use of com.jtattoo.plaf.lobo.LoboPanel in project LoboEvolution by LoboEvolution.

the class AddBookmarkWindow method createAndShowGUI.

private void createAndShowGUI(String uri) {
    final MatteBorder border = new MatteBorder(0, 0, 1, 0, foreground());
    final Container contentPane = getContentPane();
    contentPane.setLayout(null);
    setResizable(false);
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    setBounds(100, 100, 370, 440);
    final ImageIcon ico = new ImageIcon(getClass().getResource("/org/lobo/image/bookmark.png"));
    setIconImage(ico.getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH));
    LoboPanel panel = new LoboPanel();
    panel.setLayout(null);
    panel.setBounds(0, 0, 350, 400);
    contentPane.add(panel);
    LoboLabel lblEditionDeCompte = new LoboLabel("Add Bookmark");
    lblEditionDeCompte.setHorizontalAlignment(SwingConstants.CENTER);
    lblEditionDeCompte.setFont(new Font("Tahoma", Font.BOLD, 17));
    lblEditionDeCompte.setBounds(0, 0, 167, 22);
    panel.add(lblEditionDeCompte);
    LoboLabel lbldescriptionField = new LoboLabel("Description");
    lbldescriptionField.setFont(new Font("Tahoma", Font.BOLD, 14));
    lbldescriptionField.setBounds(12, 70, 282, 16);
    panel.add(lbldescriptionField);
    descriptionField = new LoboTextField();
    descriptionField.setFont(new Font("Tahoma", Font.BOLD, 12));
    descriptionField.setColumns(10);
    descriptionField.setBorder(border);
    descriptionField.setBounds(12, 98, 350, 16);
    panel.add(descriptionField);
    LoboLabel lbltitleField = new LoboLabel("Title");
    lbltitleField.setFont(new Font("Tahoma", Font.BOLD, 14));
    lbltitleField.setBounds(12, 139, 282, 16);
    panel.add(lbltitleField);
    titleField = new LoboTextField();
    titleField.setFont(new Font("Tahoma", Font.BOLD, 12));
    titleField.setColumns(10);
    titleField.setBorder(border);
    titleField.setBounds(12, 167, 350, 16);
    panel.add(titleField);
    LoboLabel lblMotDePasse_1 = new LoboLabel("Tags");
    lblMotDePasse_1.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblMotDePasse_1.setBounds(12, 208, 282, 16);
    panel.add(lblMotDePasse_1);
    tagsField = new LoboTextField();
    tagsField.setFont(new Font("Tahoma", Font.BOLD, 12));
    tagsField.setColumns(10);
    tagsField.setBorder(border);
    tagsField.setBounds(12, 236, 350, 16);
    panel.add(tagsField);
    LoboLabel lblurlField_1 = new LoboLabel("Url");
    lblurlField_1.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblurlField_1.setBounds(12, 277, 282, 16);
    panel.add(lblurlField_1);
    urlField = new LoboTextField();
    urlField.setFont(new Font("Tahoma", Font.BOLD, 12));
    urlField.setColumns(10);
    urlField.setBorder(border);
    urlField.setText(uri);
    urlField.setBounds(12, 300, 350, 16);
    panel.add(urlField);
    LoboButton okButton = new LoboButton();
    okButton.setText("Save");
    okButton.setBounds(12, 356, 150, 40);
    okButton.setActionCommand("save");
    okButton.addActionListener(this);
    panel.add(okButton);
    LoboButton closeButton = new LoboButton();
    closeButton.setText("Close");
    closeButton.setActionCommand("close");
    closeButton.addActionListener(this);
    closeButton.setBounds(180, 356, 150, 40);
    panel.add(closeButton);
}
Also used : ImageIcon(javax.swing.ImageIcon) LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) MatteBorder(javax.swing.border.MatteBorder) Container(java.awt.Container) LoboButton(com.jtattoo.plaf.lobo.LoboButton) LoboLabel(com.jtattoo.plaf.lobo.LoboLabel) LoboTextField(com.jtattoo.plaf.lobo.LoboTextField) Font(java.awt.Font)

Example 2 with LoboPanel

use of com.jtattoo.plaf.lobo.LoboPanel in project LoboEvolution by LoboEvolution.

the class ShowBookmarksWindow method listBookmarks.

private void listBookmarks(BrowserFrame frame, Container contentPane) {
    LoboSeparator separator_7 = new LoboSeparator();
    separator_7.setBounds(0, 98, 550, 12);
    contentPane.add(separator_7);
    LoboPanel panel = new LoboPanel();
    panel.setLayout(null);
    panel.setBounds(0, 40, 650, 50);
    contentPane.add(panel);
    LoboLabel description = new LoboLabel("Description");
    description.setFont(new Font("Tahoma", Font.BOLD, 14));
    description.setBounds(30, 18, 211, 16);
    panel.add(description);
    LoboLabel title = new LoboLabel("Title");
    title.setFont(new Font("Tahoma", Font.BOLD, 14));
    title.setBounds(200, 18, 150, 17);
    panel.add(title);
    LoboLabel action = new LoboLabel("Action");
    action.setFont(new Font("Tahoma", Font.BOLD, 14));
    action.setBounds(400, 18, 160, 17);
    panel.add(action);
    LoboPanel panelGeneralViewAllItems = new LoboPanel();
    panelGeneralViewAllItems.setBounds(10, 100, 530, 313);
    JScrollPane spViewallItems = new JScrollPane();
    spViewallItems.setBorder(null);
    spViewallItems.setViewportView(createItemPanel(frame));
    panelGeneralViewAllItems.setLayout(new BorderLayout());
    panelGeneralViewAllItems.add(spViewallItems, BorderLayout.CENTER);
    contentPane.add(panelGeneralViewAllItems);
}
Also used : JScrollPane(javax.swing.JScrollPane) LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) BorderLayout(java.awt.BorderLayout) LoboLabel(com.jtattoo.plaf.lobo.LoboLabel) LoboSeparator(com.jtattoo.plaf.lobo.LoboSeparator) Font(java.awt.Font)

Example 3 with LoboPanel

use of com.jtattoo.plaf.lobo.LoboPanel in project LoboEvolution by LoboEvolution.

the class ShowBookmarksWindow method createItemPanel.

private LoboPanel createItemPanel(BrowserFrame frame) {
    LoboPanel panel_3 = new LoboPanel();
    panel_3.setLayout(null);
    panel_3.setBounds(0, 191, 750, 70);
    int debutCpDesc = 15;
    int debutCpTitle = 15;
    int debutCpUrl = 15;
    int debutCpSeparator = 58;
    int incrementNouvelleLigne = 67;
    try {
        final BookmarksStore history = new BookmarksStore();
        final List<BookmarkInfo> allEntries = history.getBookmarks(100);
        for (final BookmarkInfo binfo : allEntries) {
            final String url = binfo.getUrl();
            LoboTextField description = new LoboTextField();
            description.setText(binfo.getDescription());
            description.setToolTipText(binfo.getDescription());
            description.setFont(new Font("Tahoma", Font.BOLD, 12));
            description.setEditable(false);
            description.setColumns(10);
            description.setBorder(null);
            description.setBounds(12, debutCpDesc, 180, 22);
            panel_3.add(description);
            LoboTextField title = new LoboTextField();
            title.setText(binfo.getTitle());
            title.setToolTipText(binfo.getTitle());
            title.setFont(new Font("Tahoma", Font.BOLD, 12));
            title.setEditable(false);
            title.setColumns(10);
            title.setBorder(null);
            title.setBounds(190, debutCpTitle, 150, 22);
            panel_3.add(title);
            LoboButton edit = new LoboButton();
            edit.setText("Edit");
            edit.setActionCommand("okButton");
            edit.setBounds(370, debutCpUrl, 40, 40);
            edit.addActionListener(e -> {
                desc.setText(description.getText());
                titleEditTxtFld.setText(title.getText());
                urlEditTxtFld.setText(url);
                tmpUrl = url;
            });
            panel_3.add(edit);
            LoboButton delete = new LoboButton();
            delete.setText("Delete");
            delete.setActionCommand("okButton");
            delete.setBounds(410, debutCpUrl, 50, 40);
            delete.addActionListener(e -> {
                final BookmarksStore book = new BookmarksStore();
                book.deleteBookmark(binfo.getUrl());
                JOptionPane.showMessageDialog(panel_3, "Delete Ok!");
                setVisible(false);
                dispose();
                new ShowBookmarksWindow(frame, 100).setVisible(true);
            });
            panel_3.add(delete);
            LoboButton go = new LoboButton();
            go.setText("Go");
            go.setActionCommand("goButton");
            go.setBounds(460, debutCpUrl, 40, 40);
            go.addActionListener(e -> {
                final BrowserPanel panel = frame.getPanel();
                final int indexPanel = panel.getTabbedPane().getIndex() + 1;
                final ITabbedPane tabbedPane = panel.getTabbedPane();
                HtmlPanel hpanel = HtmlPanel.createHtmlPanel(panel, url);
                final HTMLDocumentImpl nodeImpl = (HTMLDocumentImpl) hpanel.getRootNode();
                String htmlTitle = Strings.isNotBlank(nodeImpl.getTitle()) ? nodeImpl.getTitle() : "New Tab";
                tabbedPane.setComponentPopupMenu(panel);
                tabbedPane.insertTab(htmlTitle, null, hpanel, htmlTitle, indexPanel);
                tabbedPane.setSelectedIndex(indexPanel);
                TabStore.insertTab(indexPanel, url, htmlTitle);
                NavigationManager.insertHistory(url, htmlTitle, indexPanel);
            });
            panel_3.add(go);
            debutCpDesc = debutCpDesc + incrementNouvelleLigne;
            debutCpTitle = debutCpTitle + incrementNouvelleLigne;
            debutCpUrl = debutCpUrl + incrementNouvelleLigne;
            debutCpSeparator = debutCpSeparator + incrementNouvelleLigne;
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    panel_3.setPreferredSize(new Dimension(0, 1000));
    panel_3.revalidate();
    panel_3.repaint();
    return panel_3;
}
Also used : LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) LoboButton(com.jtattoo.plaf.lobo.LoboButton) ITabbedPane(org.loboevolution.component.ITabbedPane) Dimension(java.awt.Dimension) Font(java.awt.Font) BookmarksStore(org.loboevolution.store.BookmarksStore) BookmarkInfo(org.loboevolution.info.BookmarkInfo) HTMLDocumentImpl(org.loboevolution.html.dom.domimpl.HTMLDocumentImpl) HtmlPanel(org.loboevolution.html.gui.HtmlPanel) LoboTextField(com.jtattoo.plaf.lobo.LoboTextField) BrowserPanel(org.loboevolution.component.BrowserPanel)

Example 4 with LoboPanel

use of com.jtattoo.plaf.lobo.LoboPanel in project LoboEvolution by LoboEvolution.

the class ShowPasswordWindow method listPassword.

private void listPassword(BrowserFrame frame, Container contentPane) {
    LoboSeparator separator_7 = new LoboSeparator();
    separator_7.setBounds(0, 98, 510, 12);
    contentPane.add(separator_7);
    LoboPanel panel = new LoboPanel();
    panel.setLayout(null);
    panel.setBounds(0, 40, 510, 50);
    contentPane.add(panel);
    LoboLabel description = new LoboLabel("Type");
    description.setFont(new Font("Tahoma", Font.BOLD, 14));
    description.setBounds(30, 18, 211, 16);
    panel.add(description);
    LoboLabel title = new LoboLabel("Value");
    title.setFont(new Font("Tahoma", Font.BOLD, 14));
    title.setBounds(200, 18, 150, 17);
    panel.add(title);
    LoboLabel action = new LoboLabel("Action");
    action.setFont(new Font("Tahoma", Font.BOLD, 14));
    action.setBounds(400, 18, 160, 17);
    panel.add(action);
    LoboPanel panelGeneralViewAllItems = new LoboPanel();
    panelGeneralViewAllItems.setBounds(10, 100, 500, 313);
    JScrollPane spViewallItems = new JScrollPane();
    spViewallItems.setBorder(null);
    spViewallItems.setViewportView(createItemPanel(frame));
    panelGeneralViewAllItems.setLayout(new BorderLayout());
    panelGeneralViewAllItems.add(spViewallItems, BorderLayout.CENTER);
    contentPane.add(panelGeneralViewAllItems);
}
Also used : JScrollPane(javax.swing.JScrollPane) LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) BorderLayout(java.awt.BorderLayout) LoboLabel(com.jtattoo.plaf.lobo.LoboLabel) LoboSeparator(com.jtattoo.plaf.lobo.LoboSeparator) Font(java.awt.Font)

Example 5 with LoboPanel

use of com.jtattoo.plaf.lobo.LoboPanel in project LoboEvolution by LoboEvolution.

the class ShowPasswordWindow method createItemPanel.

private LoboPanel createItemPanel(BrowserFrame frame) {
    LoboPanel panel_3 = new LoboPanel();
    panel_3.setLayout(null);
    panel_3.setBounds(0, 191, 700, 70);
    int debutCpDesc = 15;
    int debutCpTitle = 15;
    int debutCpUrl = 15;
    int debutCpSeparator = 58;
    int incrementNouvelleLigne = 67;
    try {
        final InputStore store = new InputStore();
        final List<BookmarkInfo> allEntries = store.getPassword(100);
        for (final BookmarkInfo binfo : allEntries) {
            LoboTextField description = new LoboTextField();
            description.setText(binfo.getDescription());
            description.setToolTipText(binfo.getDescription());
            description.setFont(new Font("Tahoma", Font.BOLD, 12));
            description.setEditable(false);
            description.setColumns(10);
            description.setBorder(null);
            description.setBounds(12, debutCpDesc, 190, 22);
            panel_3.add(description);
            LoboTextField value = new LoboTextField();
            value.setText(binfo.getTitle());
            value.setToolTipText(binfo.getTitle());
            value.setFont(new Font("Tahoma", Font.BOLD, 12));
            value.setEditable(false);
            value.setColumns(10);
            value.setBorder(null);
            value.setBounds(190, debutCpTitle, 180, 22);
            panel_3.add(value);
            LoboSeparator separatorItem = new LoboSeparator();
            separatorItem.setBounds(0, debutCpSeparator, 500, 7);
            panel_3.add(separatorItem);
            LoboButton edit = new LoboButton();
            edit.setText("Edit");
            edit.setActionCommand("okButton");
            edit.setBounds(370, debutCpUrl, 40, 40);
            edit.addActionListener(e -> {
                type.setText(description.getText());
                valueEditTxtFld.setText(value.getText());
                urlEditTxtFld.setText(binfo.getUrl());
                tmpValue = value.getText();
            });
            panel_3.add(edit);
            LoboButton delete = new LoboButton();
            delete.setText("Delete");
            delete.setActionCommand("okButton");
            delete.setBounds(410, debutCpUrl, 50, 40);
            delete.addActionListener(e -> {
                InputStore.deleteInput(value.getText(), binfo.getUrl());
                JOptionPane.showMessageDialog(panel_3, "Delete Ok!");
                setVisible(false);
                dispose();
                new ShowPasswordWindow(frame, 100).setVisible(true);
            });
            panel_3.add(delete);
            debutCpDesc = debutCpDesc + incrementNouvelleLigne;
            debutCpTitle = debutCpTitle + incrementNouvelleLigne;
            debutCpUrl = debutCpUrl + incrementNouvelleLigne;
            debutCpSeparator = debutCpSeparator + incrementNouvelleLigne;
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    panel_3.setPreferredSize(new Dimension(0, 1000));
    panel_3.revalidate();
    panel_3.repaint();
    return panel_3;
}
Also used : BookmarkInfo(org.loboevolution.info.BookmarkInfo) LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) LoboButton(com.jtattoo.plaf.lobo.LoboButton) InputStore(org.loboevolution.store.InputStore) LoboTextField(com.jtattoo.plaf.lobo.LoboTextField) LoboSeparator(com.jtattoo.plaf.lobo.LoboSeparator) Dimension(java.awt.Dimension) Font(java.awt.Font)

Aggregations

LoboPanel (com.jtattoo.plaf.lobo.LoboPanel)28 LoboButton (com.jtattoo.plaf.lobo.LoboButton)10 LoboLabel (com.jtattoo.plaf.lobo.LoboLabel)10 Dimension (java.awt.Dimension)10 Font (java.awt.Font)10 BoxLayout (javax.swing.BoxLayout)9 LoboSeparator (com.jtattoo.plaf.lobo.LoboSeparator)7 LoboTextField (com.jtattoo.plaf.lobo.LoboTextField)7 BorderLayout (java.awt.BorderLayout)3 JScrollPane (javax.swing.JScrollPane)3 EmptyBorder (javax.swing.border.EmptyBorder)3 BookmarkInfo (org.loboevolution.info.BookmarkInfo)3 BrowserPanel (org.loboevolution.component.BrowserPanel)2 ITabbedPane (org.loboevolution.component.ITabbedPane)2 HTMLDocumentImpl (org.loboevolution.html.dom.domimpl.HTMLDocumentImpl)2 HtmlPanel (org.loboevolution.html.gui.HtmlPanel)2 BookmarksStore (org.loboevolution.store.BookmarksStore)2 NavigationStore (org.loboevolution.store.NavigationStore)2 LoboCheckBox (com.jtattoo.plaf.lobo.LoboCheckBox)1 Container (java.awt.Container)1