public UrlComboBox() { setToolTipText("URL"); setEditable(true); final JTextField editorComponent = (JTextField) getEditor().getEditorComponent(); editorComponent.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { editorComponent.selectAll(); } }); AutoCompletion ac = new AutoCompletion(this); ac.setStrict(false); ac.setStrictCompletion(false); }
public void action(Component c) { Resizable.ResizeCorner corner = new Resizable.ResizeCorner(Resizable.LOWER_RIGHT); corner.addMouseListener(_resizableSupport.getResizable().getMouseInputAdapter()); corner.addMouseMotionListener(_resizableSupport.getResizable().getMouseInputAdapter()); ((JideScrollPane) c).setScrollBarCorner(JideScrollPane.VERTICAL_BOTTOM, corner); ((JideScrollPane) c).setScrollBarCorner(JideScrollPane.VERTICAL_TOP, null); }
private void setInitValue() { int index = getSearchable().getSelectedIndex(); if (index != -1) { Object selected = getSearchable().getElementAt(index); if (selected != null) _document.setText(getSearchable().convertElementToString(selected)); highlightCompletedText(0); } else { _document.setText(""); } }
/** * Returns the first selected index; returns -1 if there is no selected item. * * @return the value of <code>getMinSelectionIndex</code> * @see #getMinSelectionIndex * @see #addListSelectionListener */ public int getCheckBoxListSelectedIndex() { return getCheckBoxListSelectionModel().getMinSelectionIndex(); }
/** * Starts flashing. */ public void startFlashing() { clearFlashing(); getAnimator().start(); }
/** * Sets the strict property. If true, it will not allow user to type in anything that is not in the known item list. * If false, user can type in whatever he/she wants. If the text can match with a item in the known item list, it * will still auto-complete. * * @param strict true or false. */ public void setStrict(boolean strict) { getAutoCompletion().setStrict(strict); }
/** * Set the divider location. You can only call this method to set the divider location when the component is * rendered on the screen. If the component has never been displayed before, this method call has no effect. * * @param dividerIndex the divider index, starting from 0 for the first divider. * @param location new location */ public void setDividerLocation(int dividerIndex, int location) { ((JideSplitPaneLayout) getLayout()).setDividerLocation(dividerIndex, location, true); validate(); }
public static StyledLabel createStyledLabel(String text) { StyledLabel label = new StyledLabel(); setStyledText(label, text); return label; }
@Override protected void configurePropertiesFromAction(Action a) { super.configurePropertiesFromAction(a); if (hasSelectedKey(a)) { setSelectedFromAction(a); } }
/** * Gets the strict property. * * @return the value of strict property. */ public boolean isStrict() { return getAutoCompletion().isStrict(); }
public void actionPerformed(ActionEvent e) { searchableBar.getInstaller().openSearchBar(searchableBar); searchableBar.focusSearchField(); } }, keyStroke, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
@Override public void keyTyped(KeyEvent e) { boolean passive = _searchableProvider == null || _searchableProvider.isPassive(); if (passive) { keyTypedOrPressed(e); } }
private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; }
public void mousePressed(MouseEvent e) { if (!isScrollOnRollover()) { startTimer(e, 500); } else { updateTimer(e); } }
public void mouseReleased(MouseEvent e) { if (!isScrollOnRollover()) { stopTimer(); } else { updateTimer(e); } }
/** * Messages dragDividerTo with the new location for the mouse event. * * @param e the mouse event. */ protected void continueDrag(MouseEvent e) { dragDividerTo(positionForMouseEvent(e)); }
public void mouseEntered(MouseEvent e) { if (isScrollOnRollover()) { startTimer(e, 500); } }