/** Impl of HierarchyListener, starts init job with delay when component shown, * stops listening to asociated component it isn't showing anymore, * calls cancel if desirable. * @param evt hierarchy event */ @Override public void hierarchyChanged(HierarchyEvent evt) { final boolean hierachyChanged = (evt.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0; LOG.log(Level.FINE, "Hierarchy Changed {0}", hierachyChanged); if (hierachyChanged) { boolean isShowing = comp4Init.isShowing(); if (timer == null && isShowing) { timer = new Timer(20, this); timer.setRepeats(false); timer.start(); LOG.log(Level.FINE, "Timer started for {0}", comp4Init); } else if (!isShowing) { comp4Init.removeHierarchyListener(this); LOG.log(Level.FINE, "Not showing, cancling for {0}", comp4Init); cancel(); } } }
/** Impl of HierarchyListener, starts init job with delay when component shown, * stops listening to asociated component it isn't showing anymore, * calls cancel if desirable. * @param evt hierarchy event */ @Override public void hierarchyChanged(HierarchyEvent evt) { final boolean hierachyChanged = (evt.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0; LOG.log(Level.FINE, "Hierarchy Changed {0}", hierachyChanged); if (hierachyChanged) { boolean isShowing = comp4Init.isShowing(); if (timer == null && isShowing) { timer = new Timer(20, this); timer.setRepeats(false); timer.start(); LOG.log(Level.FINE, "Timer started for {0}", comp4Init); } else if (!isShowing) { comp4Init.removeHierarchyListener(this); LOG.log(Level.FINE, "Not showing, cancling for {0}", comp4Init); cancel(); } } }
/** Impl of HierarchyListener, starts init job with delay when component shown, * stops listening to asociated component it isn't showing anymore, * calls cancel if desirable. * @param evt hierarchy event */ @Override public void hierarchyChanged(HierarchyEvent evt) { final boolean hierachyChanged = (evt.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0; LOG.log(Level.FINE, "Hierarchy Changed {0}", hierachyChanged); if (hierachyChanged) { boolean isShowing = comp4Init.isShowing(); if (timer == null && isShowing) { timer = new Timer(20, this); timer.setRepeats(false); timer.start(); LOG.log(Level.FINE, "Timer started for {0}", comp4Init); } else if (!isShowing) { comp4Init.removeHierarchyListener(this); LOG.log(Level.FINE, "Not showing, cancling for {0}", comp4Init); cancel(); } } }
/** Impl of HierarchyListener, starts init job with delay when component shown, * stops listening to asociated component it isn't showing anymore, * calls cancel if desirable. * @param evt hierarchy event */ public void hierarchyChanged(HierarchyEvent evt) { if (((evt.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0)) { boolean isShowing = comp4Init.isShowing(); if (timer == null && isShowing) { timer = new Timer(20, this); timer.setRepeats(false); timer.start(); } else if (!isShowing) { comp4Init.removeHierarchyListener(this); cancel(); } } }
/** Stops listening to asociated component it isn't showing anymore, * calls cancel if desirable. * @param evt hierarchy event */ public void hierarchyChanged(HierarchyEvent evt) { if (((evt.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) && !comp4Init.isShowing()) { comp4Init.removeHierarchyListener(this); cancel(); } }
/** Stops listening to asociated component it isn't showing anymore, * calls cancel if desirable. * @param evt hierarchy event */ public void hierarchyChanged(HierarchyEvent evt) { if (((evt.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) && !comp4Init.isShowing()) { comp4Init.removeHierarchyListener(this); cancel(); } }