List of usage examples for java.awt.event ComponentEvent getID
public int getID()
From source file:Main.java
@Override public void componentShown(ComponentEvent evt) { System.out.println(evt.getID() == ComponentEvent.COMPONENT_FIRST); }
From source file:Main.java
@Override public void componentShown(ComponentEvent evt) { System.out.println(evt.getID() == ComponentEvent.COMPONENT_LAST); }
From source file:Main.java
@Override public void componentMoved(ComponentEvent e) { System.out.println(e.getID() == ComponentEvent.COMPONENT_MOVED); }
From source file:Main.java
@Override public void componentHidden(ComponentEvent e) { System.out.println(e.getID() == ComponentEvent.COMPONENT_HIDDEN); }
From source file:Main.java
@Override public void componentResized(ComponentEvent e) { System.out.println(e.getID() == ComponentEvent.COMPONENT_RESIZED); }
From source file:Main.java
@Override public void componentShown(ComponentEvent evt) { System.out.println(evt.getID() == ComponentEvent.COMPONENT_SHOWN); }
From source file:Main.java
@Override public void componentShown(ComponentEvent evt) { System.out.println(evt.getID() == ComponentEvent.COMPONENT_FIRST); ComponentEvent event = new ComponentEvent((Component) evt.getSource(), ComponentEvent.COMPONENT_MOVED); }
From source file:Main.java
protected void processComponentEvent(ComponentEvent e) { if (e.getID() == ComponentEvent.COMPONENT_RESIZED) { int w = getSize().width; yearSlider.setLabelTable(null);//from w ww. j a v a 2s .co m if (w > 200) yearSlider.setMajorTickSpacing(5); else yearSlider.setMajorTickSpacing(10); yearSlider.setPaintLabels(w > 100); monthSlider.setLabelTable(w > 300 ? hashTable : null); if (w <= 300 && w >= 200) monthSlider.setMajorTickSpacing(1); else monthSlider.setMajorTickSpacing(2); monthSlider.setPaintLabels(w > 100); daySlider.setLabelTable(null); if (w > 200) daySlider.setMajorTickSpacing(5); else daySlider.setMajorTickSpacing(10); daySlider.setPaintLabels(w > 100); } }
From source file:EventTestPane.java
/** Display Component events. */ public void processComponentEvent(ComponentEvent e) { switch (e.getID()) { case ComponentEvent.COMPONENT_MOVED: showLine("COMPONENT_MOVED"); break;//w w w . ja va 2s .c o m case ComponentEvent.COMPONENT_RESIZED: showLine("COMPONENT_RESIZED"); break; case ComponentEvent.COMPONENT_HIDDEN: showLine("COMPONENT_HIDDEN"); break; case ComponentEvent.COMPONENT_SHOWN: showLine("COMPONENT_SHOWN"); break; } }
From source file:it.ventuland.ytd.ui.GUIClient.java
@Override public void processComponentEvent(ComponentEvent e) { switch (e.getID()) { case ComponentEvent.COMPONENT_MOVED: break;/*from ww w .j av a2 s . c o m*/ case ComponentEvent.COMPONENT_RESIZED: middlepane.setDividerLocation(middlepane.getWidth() / 3); break; case ComponentEvent.COMPONENT_HIDDEN: break; case ComponentEvent.COMPONENT_SHOWN: break; } }