Search in sources :

Example 1 with LoboButton

use of com.jtattoo.plaf.lobo.LoboButton 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 LoboButton

use of com.jtattoo.plaf.lobo.LoboButton 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 3 with LoboButton

use of com.jtattoo.plaf.lobo.LoboButton 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)

Example 4 with LoboButton

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

the class ShowPasswordWindow method savePassword.

private void savePassword(BrowserFrame frame, Container contentPane) {
    LoboPanel panel2 = new LoboPanel();
    panel2.setLayout(null);
    panel2.setBounds(510, 40, 403, 436);
    contentPane.add(panel2);
    LoboSeparator separator_2 = new LoboSeparator();
    separator_2.setBounds(0, 58, 403, 12);
    panel2.add(separator_2);
    LoboLabel editPassword = new LoboLabel("Password");
    editPassword.setHorizontalAlignment(SwingConstants.CENTER);
    editPassword.setFont(new Font("Tahoma", Font.BOLD, 17));
    editPassword.setBounds(70, 18, 167, 22);
    panel2.add(editPassword);
    LoboLabel lblType = new LoboLabel("Type");
    lblType.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblType.setBounds(12, 70, 282, 16);
    panel2.add(lblType);
    type = new LoboTextField();
    type.setFont(new Font("Tahoma", Font.BOLD, 12));
    type.setColumns(10);
    type.setBorder(null);
    type.setEditable(false);
    type.setBounds(12, 98, 350, 16);
    panel2.add(type);
    LoboSeparator separator_9 = new LoboSeparator();
    separator_9.setBounds(12, 115, 350, 12);
    panel2.add(separator_9);
    LoboLabel titleLbl = new LoboLabel("Value");
    titleLbl.setFont(new Font("Tahoma", Font.BOLD, 14));
    titleLbl.setBounds(12, 139, 282, 16);
    panel2.add(titleLbl);
    valueEditTxtFld = new LoboTextField();
    valueEditTxtFld.setFont(new Font("Tahoma", Font.BOLD, 12));
    valueEditTxtFld.setColumns(10);
    valueEditTxtFld.setBorder(null);
    valueEditTxtFld.setBounds(12, 167, 350, 16);
    panel2.add(valueEditTxtFld);
    LoboSeparator separator_10 = new LoboSeparator();
    separator_10.setBounds(12, 184, 350, 12);
    panel2.add(separator_10);
    LoboLabel url_1 = new LoboLabel("Url");
    url_1.setFont(new Font("Tahoma", Font.BOLD, 14));
    url_1.setBounds(12, 200, 282, 16);
    panel2.add(url_1);
    urlEditTxtFld = new LoboTextField();
    urlEditTxtFld.setFont(new Font("Tahoma", Font.BOLD, 12));
    urlEditTxtFld.setColumns(10);
    urlEditTxtFld.setBorder(null);
    urlEditTxtFld.setEditable(false);
    urlEditTxtFld.setBounds(12, 230, 275, 16);
    panel2.add(urlEditTxtFld);
    LoboSeparator separator_11 = new LoboSeparator();
    separator_11.setBounds(12, 250, 350, 12);
    panel2.add(separator_11);
    LoboButton okButton = new LoboButton();
    okButton.setText("Save");
    okButton.setActionCommand("okButton");
    okButton.setBounds(12, 280, 200, 40);
    okButton.addActionListener(e -> {
        InputStore.deleteInput(tmpValue, tmpUrl);
        InputStore.insertLogin(type.getText(), valueEditTxtFld.getText(), urlEditTxtFld.getText(), true);
        JOptionPane.showMessageDialog(contentPane, "Edit Ok!");
        setVisible(false);
        dispose();
        new ShowPasswordWindow(frame, 100).setVisible(true);
    });
    panel2.add(okButton);
    LoboButton closeButton = new LoboButton();
    closeButton.setText("Close");
    closeButton.setActionCommand("closeButton");
    closeButton.addActionListener(e -> {
        setVisible(false);
        dispose();
    });
    closeButton.setBounds(224, 280, 138, 40);
    panel2.add(closeButton);
}
Also used : LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) LoboButton(com.jtattoo.plaf.lobo.LoboButton) LoboLabel(com.jtattoo.plaf.lobo.LoboLabel) LoboTextField(com.jtattoo.plaf.lobo.LoboTextField) LoboSeparator(com.jtattoo.plaf.lobo.LoboSeparator) Font(java.awt.Font)

Example 5 with LoboButton

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

the class ShowRecentWindow method saveHost.

private void saveHost(BrowserFrame frame, Container contentPane) {
    LoboPanel panel2 = new LoboPanel();
    panel2.setLayout(null);
    panel2.setBounds(550, 40, 403, 436);
    contentPane.add(panel2);
    LoboSeparator separator_2 = new LoboSeparator();
    separator_2.setBounds(0, 58, 350, 12);
    panel2.add(separator_2);
    LoboLabel editBookmark = new LoboLabel("Host");
    editBookmark.setHorizontalAlignment(SwingConstants.CENTER);
    editBookmark.setFont(new Font("Tahoma", Font.BOLD, 17));
    editBookmark.setBounds(70, 18, 167, 22);
    panel2.add(editBookmark);
    LoboLabel lblUrl = new LoboLabel("URL");
    lblUrl.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblUrl.setBounds(12, 70, 282, 16);
    panel2.add(lblUrl);
    urlEditTxtFld = new LoboTextField();
    urlEditTxtFld.setFont(new Font("Tahoma", Font.BOLD, 12));
    urlEditTxtFld.setColumns(10);
    urlEditTxtFld.setBorder(null);
    urlEditTxtFld.setBounds(12, 98, 350, 16);
    panel2.add(urlEditTxtFld);
    LoboSeparator separator_8 = new LoboSeparator();
    separator_8.setBounds(12, 115, 380, 12);
    panel2.add(separator_8);
    LoboLabel lblTitle = new LoboLabel("Title");
    lblTitle.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblTitle.setBounds(12, 139, 282, 16);
    panel2.add(lblTitle);
    titleEditTxtFld = new LoboTextField();
    titleEditTxtFld.setFont(new Font("Tahoma", Font.BOLD, 12));
    titleEditTxtFld.setColumns(10);
    titleEditTxtFld.setBorder(null);
    titleEditTxtFld.setBounds(12, 167, 350, 16);
    panel2.add(titleEditTxtFld);
    LoboSeparator separator_9 = new LoboSeparator();
    separator_9.setBounds(12, 184, 380, 12);
    panel2.add(separator_9);
    LoboButton okButton = new LoboButton();
    okButton.setText("Save");
    okButton.setActionCommand("okButton");
    okButton.setBounds(25, 340, 150, 40);
    okButton.addActionListener(e -> {
        final NavigationStore nav = new NavigationStore();
        nav.deleteHost(tmpUrl);
        nav.addAsRecent(tmpUrl, titleEditTxtFld.getText(), -1);
        JOptionPane.showMessageDialog(contentPane, "Edit Ok!");
        setVisible(false);
        dispose();
        new ShowRecentWindow(frame).setVisible(true);
    });
    panel2.add(okButton);
    LoboButton closeButton = new LoboButton();
    closeButton.setText("Close");
    closeButton.setActionCommand("closeButton");
    closeButton.addActionListener(e -> {
        setVisible(false);
        dispose();
    });
    closeButton.setBounds(180, 340, 138, 40);
    panel2.add(closeButton);
}
Also used : LoboPanel(com.jtattoo.plaf.lobo.LoboPanel) LoboButton(com.jtattoo.plaf.lobo.LoboButton) NavigationStore(org.loboevolution.store.NavigationStore) LoboLabel(com.jtattoo.plaf.lobo.LoboLabel) LoboTextField(com.jtattoo.plaf.lobo.LoboTextField) LoboSeparator(com.jtattoo.plaf.lobo.LoboSeparator) Font(java.awt.Font)

Aggregations

LoboButton (com.jtattoo.plaf.lobo.LoboButton)14 LoboPanel (com.jtattoo.plaf.lobo.LoboPanel)10 LoboTextField (com.jtattoo.plaf.lobo.LoboTextField)7 Font (java.awt.Font)7 LoboLabel (com.jtattoo.plaf.lobo.LoboLabel)5 LoboSeparator (com.jtattoo.plaf.lobo.LoboSeparator)4 Dimension (java.awt.Dimension)3 BoxLayout (javax.swing.BoxLayout)3 BookmarkInfo (org.loboevolution.info.BookmarkInfo)3 LoboCheckBox (com.jtattoo.plaf.lobo.LoboCheckBox)2 EmptyBorder (javax.swing.border.EmptyBorder)2 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 Container (java.awt.Container)1 ImageIcon (javax.swing.ImageIcon)1 MatteBorder (javax.swing.border.MatteBorder)1