@Override public void showAt(int x, int y) { if (disabled) return; lastActive = new Date(); clearTimers(); super.showAt(x, y); if (toolTipConfig.getAnchor() != null) { anchorEl.show(); syncAnchor(); } else { anchorEl.hide(); } if (toolTipConfig.getDismissDelay() > 0 && toolTipConfig.isAutoHide() && !toolTipConfig.isCloseable()) { dismissTimer = new Timer() { @Override public void run() { hide(); } }; dismissTimer.schedule(toolTipConfig.getDismissDelay()); } }
@Override public void show() { if (disabled) return; Side origAnchor = null; boolean origConstrainPosition = false; if (toolTipConfig.getAnchor() != null) { origAnchor = toolTipConfig.getAnchor(); // pre-show it off screen so that the el will have dimensions // for positioning calcs when getting xy next // showAt(-1000, -1000); origConstrainPosition = this.constrainPosition; constrainPosition = false; } showAt(getTargetXY(0)); if (toolTipConfig.getAnchor() != null) { anchorEl.show(); syncAnchor(); constrainPosition = origConstrainPosition; toolTipConfig.setAnchor(origAnchor); } else { anchorEl.hide(); } }