changedUpdate exception
[fedora-idea.git] / platform / platform-impl / src / com / intellij / ui / Hint.java
blob7c3f3832aa39d46d058c6108b64fc4c81b8d8841
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.ui;
18 import org.jetbrains.annotations.NotNull;
20 import javax.swing.*;
22 public interface Hint {
23 /**
24 * @param parentComponent defines coordinate system where hint will be shown.
25 * Cannot be <code>null</code>.
27 * @param x x coordinate of hint in parent coordinate system
29 * @param y y coordinate of hint in parent coordinate system
31 * @param focusBackComponent component which should get focus when the hint will
32 * be hidden. If <code>null</code> then the hint doesn't manage focus after closing.
34 void show(@NotNull JComponent parentComponent, int x, int y, JComponent focusBackComponent);
36 /**
37 * @return whether the hint is showing or not
39 boolean isVisible();
41 void hide();
43 void addHintListener(HintListener listener);
45 void removeHintListener(HintListener listener);