List of usage examples for java.awt.event FocusEvent isTemporary
public boolean isTemporary()
From source file:EventTestPane.java
/** * Display keyboard focus events. Focus can be permanently gained or lost, * or temporarily transferred to or from a component. *//*from w w w . jav a2 s. c om*/ public void processFocusEvent(FocusEvent e) { if (e.getID() == FocusEvent.FOCUS_GAINED) showLine("FOCUS_GAINED" + (e.isTemporary() ? " (temporary)" : "")); else showLine("FOCUS_LOST" + (e.isTemporary() ? " (temporary)" : "")); }
From source file:com.github.fritaly.dualcommander.TabbedPane.java
@Override public void focusGained(FocusEvent e) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusGained(event); }/*w w w.j a v a 2 s .c om*/ } }
From source file:com.github.fritaly.dualcommander.TabbedPane.java
@Override public void focusLost(FocusEvent e) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusLost(event);//from ww w . j a va 2 s.c o m } } }
From source file:com.github.fritaly.dualcommander.DirectoryBrowser.java
@Override public void focusGained(FocusEvent e) { if (e.getSource() == table) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusGained(event); }//from w w w . jav a 2s . co m } } }
From source file:com.github.fritaly.dualcommander.DirectoryBrowser.java
@Override public void focusLost(FocusEvent e) { if (e.getSource() == table) { // Propagate the event final FocusListener[] listeners = getListeners(FocusListener.class); if (listeners != null) { final FocusEvent event = new FocusEvent(this, e.getID(), e.isTemporary(), e.getOppositeComponent()); for (FocusListener listener : listeners) { listener.focusLost(event); }/*ww w . ja va 2s . com*/ } } }
From source file:co.com.soinsoftware.hotelero.view.JFRoom.java
private void jtfIdentificationOnFocusLost(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_jtfIdentificationOnFocusLost if (!evt.isTemporary()) { final long identification = this.getClientIdentification(); if (identification > 0) { this.user = this.userController.select(identification); if (this.user != null) { this.jtfName.setText(this.user.getName()); this.jtfPhone.setText(String.valueOf(this.user.getPhone())); if (this.user.getCareer() != null) { this.jtfCareer.setText(this.user.getCareer()); }/*from ww w . ja va 2 s .c o m*/ if (this.user.getCompany() != null) { this.jcbCompany.setSelectedItem(this.user.getCompany().getName()); } } } } }
From source file:org.jspresso.framework.binding.swing.JActionFieldConnector.java
/** * {@inheritDoc}//from w ww. j a v a 2s . co m */ @Override protected void bindJComponent() { getConnectedJComponent().addTextFieldFocusListener(new FocusAdapter() { /** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { performActionIfNeeded(); } } }); }
From source file:org.jspresso.framework.binding.swing.JTextComponentConnector.java
/** * {@inheritDoc}//from www.j a v a 2 s.c o m */ @Override protected void bindJComponent() { getConnectedJComponent().addFocusListener(new FocusAdapter() { /** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { fireConnectorValueChange(); } } }); }
From source file:org.xulux.swing.listeners.PrePostFieldListener.java
/** * now call pre..//from w w w .jav a 2s .co m * @see java.awt.event.FocusListener#focusGained(FocusEvent) */ public void focusGained(FocusEvent e) { if (isProcessing()) { return; } if (e.getID() != FocusEvent.FOCUS_GAINED || e.isTemporary()) { return; } NyxEventQueue q = NyxEventQueue.getInstance(); q.holdEvents(false); started(); }
From source file:org.xulux.swing.listeners.PrePostFieldListener.java
/** * now call post..// w w w. j a v a2s .c o m * @see java.awt.event.FocusListener#focusLost(FocusEvent) */ public void focusLost(FocusEvent e) { if (isProcessing()) { return; } if (e.getID() != FocusEvent.FOCUS_LOST || e.isTemporary()) { return; } NyxEventQueue q = NyxEventQueue.getInstance(); // @todo make test.. // A checkbox would consume an event, so it wouldn't process // any further.. Need to make a test of this! if (!(e.getComponent() instanceof JCheckBox)) { q.holdEvents(true); q.holdAccepted(this); } }