Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.ui.popup;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.popup.*;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Pair;
import com.intellij.ui.ActiveComponent;
import com.intellij.util.BooleanFunction;
import com.intellij.util.Processor;
import com.intellij.util.ui.EmptyIcon;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.util.*;
import java.util.List;
/**
* @author anna
* @since 15-Mar-2006
*/
public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
private String myTitle = "";
private boolean myResizable;
private boolean myMovable;
private final JComponent myComponent;
private final JComponent myPreferredFocusedComponent;
private boolean myRequestFocus;
private String myDimensionServiceKey = null;
private Computable myCallback = null;
private Project myProject;
private boolean myCancelOnClickOutside = true;
private boolean myCancelOnWindowDeactivation = true;
private final Set myListeners = new LinkedHashSet();
private boolean myUseDimServiceForXYLocation;
private IconButton myCancelButton;
private MouseChecker myCancelOnMouseOutCallback;
private boolean myCancelOnWindow;
private ActiveIcon myTitleIcon = new ActiveIcon(EmptyIcon.ICON_0);
private boolean myCancelKeyEnabled = true;
private boolean myLocateByContent = false;
private boolean myPlaceWithinScreen = true;
private Processor myPinCallback = null;
private Dimension myMinSize;
private MaskProvider myMaskProvider;
private float myAlpha;
private List