@Override public void installUI(JComponent c) { super.installUI(c); layoutAndBorder = createBuddyLayoutAndBorder(); layoutAndBorder.install((JTextField) c); }
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
/** * Removes all installed listeners, the layout and resets the search field * original border and removes all children. */ @Override public void uninstallUI(JComponent c) { super.uninstallUI(c); searchField.removePropertyChangeListener(getHandler()); searchField.getDocument().removeDocumentListener(getHandler()); popupButton().removeActionListener(getHandler()); searchField.setLayout(null); searchField.removeAll(); searchField = null; }
/** * Calls {@link #installDefaults()}, adds the search, clear and popup button * to the search field and registers a {@link PropertyChangeListener} ad * {@link DocumentListener} and an {@link ActionListener} on the popup * button. */ @Override public void installUI(JComponent c) { searchField = (JXSearchField) c; super.installUI(c); installDefaults(); layoutButtons(); configureListeners(); }
return new SearchFieldUI(textUI); } else if (textComponent instanceof JTextField) { return new BuddyTextFieldUI(textUI); } else if (textComponent instanceof JTextArea) { return new PromptTextAreaUI(textUI);
/** * Removes all installed listeners, the layout and resets the search field * original border and removes all children. */ @Override public void uninstallUI(JComponent c) { super.uninstallUI(c); searchField.removePropertyChangeListener(getHandler()); searchField.getDocument().removeDocumentListener(getHandler()); popupButton().removeActionListener(getHandler()); searchField.setLayout(null); searchField.removeAll(); searchField = null; }
/** * Calls {@link #installDefaults()}, adds the search, clear and popup button * to the search field and registers a {@link PropertyChangeListener} ad * {@link DocumentListener} and an {@link ActionListener} on the popup * button. */ @Override public void installUI(JComponent c) { searchField = (JXSearchField) c; super.installUI(c); installDefaults(); layoutButtons(); configureListeners(); }
return new SearchFieldUI(textUI); } else if (textComponent instanceof JTextField) { return new BuddyTextFieldUI(textUI); } else if (textComponent instanceof JTextArea) { return new PromptTextAreaUI(textUI);
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
@Override public void installUI(JComponent c) { super.installUI(c); layoutAndBorder = createBuddyLayoutAndBorder(); layoutAndBorder.install((JTextField) c); }
/** * Removes all installed listeners, the layout and resets the search field * original border and removes all children. */ @Override public void uninstallUI(JComponent c) { super.uninstallUI(c); searchField.removePropertyChangeListener(getHandler()); searchField.getDocument().removeDocumentListener(getHandler()); popupButton().removeActionListener(getHandler()); searchField.setLayout(null); searchField.removeAll(); searchField = null; }
/** * Calls {@link #installDefaults()}, adds the search, clear and popup button * to the search field and registers a {@link PropertyChangeListener} ad * {@link DocumentListener} and an {@link ActionListener} on the popup * button. */ @Override public void installUI(JComponent c) { searchField = (JXSearchField) c; super.installUI(c); installDefaults(); layoutButtons(); configureListeners(); }
return new SearchFieldUI(textUI); } else if (textComponent instanceof JTextField) { return new BuddyTextFieldUI(textUI); } else if (textComponent instanceof JTextArea) { return new PromptTextAreaUI(textUI);
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
@Override public void installUI(JComponent c) { super.installUI(c); layoutAndBorder = createBuddyLayoutAndBorder(); layoutAndBorder.install((JTextField) c); }
/** * Removes all installed listeners, the layout and resets the search field * original border and removes all children. */ @Override public void uninstallUI(JComponent c) { super.uninstallUI(c); searchField.removePropertyChangeListener(getHandler()); searchField.getDocument().removeDocumentListener(getHandler()); popupButton().removeActionListener(getHandler()); searchField.setLayout(null); searchField.removeAll(); searchField = null; }
/** * Calls {@link #installDefaults()}, adds the search, clear and popup button * to the search field and registers a {@link PropertyChangeListener} ad * {@link DocumentListener} and an {@link ActionListener} on the popup * button. */ @Override public void installUI(JComponent c) { searchField = (JXSearchField) c; super.installUI(c); installDefaults(); layoutButtons(); configureListeners(); }
return new SearchFieldUI(textUI); } else if (textComponent instanceof JTextField) { return new BuddyTextFieldUI(textUI); } else if (textComponent instanceof JTextArea) { return new PromptTextAreaUI(textUI);
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
@Override public void installUI(JComponent c) { super.installUI(c); layoutAndBorder = createBuddyLayoutAndBorder(); layoutAndBorder.install((JTextField) c); }