mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup, remove unused field & methods
This commit is contained in:
@@ -20,7 +20,7 @@ import com.intellij.openapi.ui.Divider;
|
||||
import com.intellij.openapi.ui.PseudoSplitter;
|
||||
import com.intellij.openapi.ui.Splitter;
|
||||
import com.intellij.openapi.vcs.changes.RefreshablePanel;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -29,12 +29,6 @@ import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseMotionListener;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Irina.Chernushina
|
||||
* Date: 8/22/11
|
||||
* Time: 2:33 PM
|
||||
*/
|
||||
public abstract class SplitterWithSecondHideable {
|
||||
public interface OnOffListener<T> {
|
||||
void on(T t);
|
||||
@@ -43,17 +37,15 @@ public abstract class SplitterWithSecondHideable {
|
||||
|
||||
private final PseudoSplitter mySplitter;
|
||||
private final AbstractTitledSeparatorWithIcon myTitledSeparator;
|
||||
private final boolean myVertical;
|
||||
private final OnOffListener<Integer> myListener;
|
||||
private final JPanel myFictivePanel;
|
||||
private Splitter.DividerImpl mySuperDivider;
|
||||
private float myPreviousProportion;
|
||||
|
||||
public SplitterWithSecondHideable(final boolean vertical,
|
||||
final String separatorText,
|
||||
final JComponent firstComponent,
|
||||
final OnOffListener<Integer> listener) {
|
||||
myVertical = vertical;
|
||||
public SplitterWithSecondHideable(boolean vertical,
|
||||
String separatorText,
|
||||
JComponent firstComponent,
|
||||
OnOffListener<Integer> listener) {
|
||||
myListener = listener;
|
||||
myFictivePanel = new JPanel(new BorderLayout());
|
||||
Icon icon;
|
||||
@@ -119,8 +111,7 @@ public abstract class SplitterWithSecondHideable {
|
||||
myTitledSeparator.mySeparator.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e) {
|
||||
myTitledSeparator.mySeparator
|
||||
.setCursor(myTitledSeparator.myOn ? new Cursor(Cursor.S_RESIZE_CURSOR) : new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
myTitledSeparator.mySeparator.setCursor(new Cursor(myTitledSeparator.myOn ? Cursor.S_RESIZE_CURSOR : Cursor.DEFAULT_CURSOR));
|
||||
((MyDivider)mySuperDivider).processMouseEvent(e);
|
||||
}
|
||||
|
||||
@@ -179,7 +170,7 @@ public abstract class SplitterWithSecondHideable {
|
||||
mySuperDivider = new MyDivider();
|
||||
mySuperDivider.add(myTitledSeparator,
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(0, 0, 0, 0), 0, 0));
|
||||
JBUI.emptyInsets(), 0, 0));
|
||||
return mySuperDivider;
|
||||
}
|
||||
|
||||
@@ -211,10 +202,6 @@ public abstract class SplitterWithSecondHideable {
|
||||
myTitledSeparator.setText(value);
|
||||
}
|
||||
|
||||
public void setEnabledColor(final boolean enabled) {
|
||||
myTitledSeparator.myLabel.setForeground(enabled ? UIUtil.getActiveTextColor() : UIUtil.getInactiveTextColor());
|
||||
}
|
||||
|
||||
public Splitter getComponent() {
|
||||
return mySplitter;
|
||||
}
|
||||
|
||||
@@ -17,12 +17,6 @@ package com.intellij.openapi.ui;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Irina.Chernushina
|
||||
* Date: 12/3/11
|
||||
* Time: 6:13 PM
|
||||
*/
|
||||
public class PseudoSplitter extends Splitter {
|
||||
private boolean myFirstIsFixed;
|
||||
private boolean mySecondIsFixed;
|
||||
@@ -35,16 +29,6 @@ public class PseudoSplitter extends Splitter {
|
||||
mySecondIsFixed = false;
|
||||
}
|
||||
|
||||
public PseudoSplitter(boolean vertical, float proportion) {
|
||||
super(vertical, proportion);
|
||||
myFirstIsFixed = true;
|
||||
}
|
||||
|
||||
public PseudoSplitter(boolean vertical, float proportion, float minProp, float maxProp) {
|
||||
super(vertical, proportion, minProp, maxProp);
|
||||
myFirstIsFixed = true;
|
||||
}
|
||||
|
||||
private int getSizeForComp(final JComponent component) {
|
||||
return getOrientation() ? component.getHeight() : component.getWidth();
|
||||
}
|
||||
@@ -64,13 +48,6 @@ public class PseudoSplitter extends Splitter {
|
||||
mySecondIsFixed = false;
|
||||
}
|
||||
|
||||
public void fixSecond() {
|
||||
assert getSecondComponent() != null;
|
||||
mySecondFixedSize = getSizeForComp(getSecondComponent());
|
||||
myFirstIsFixed = false;
|
||||
mySecondIsFixed = true;
|
||||
}
|
||||
|
||||
public void freeAll() {
|
||||
myFirstIsFixed = false;
|
||||
mySecondIsFixed = false;
|
||||
|
||||
Reference in New Issue
Block a user