Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some fields in the FlyoutPaletteComposite protected rather than … #685

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,15 @@
private static final int MIN_PALETTE_SIZE = 20;
private static final int MAX_PALETTE_SIZE = 500;

private static final int STATE_HIDDEN = 8;
private static final int STATE_EXPANDED = 1;
/**
* @since 3.21
*/
protected static final int STATE_HIDDEN = 8;

/**
* @since 3.21
*/
protected static final int STATE_EXPANDED = 1;

private static final Dimension ARROW_SIZE = new Dimension(6, 11);
private static final int SASH_BUTTON_WIDTH = 11;
Expand All @@ -129,12 +136,22 @@
public static final int STATE_PINNED_OPEN = 4;

private final PropertyChangeSupport listeners = new PropertyChangeSupport(this);
private final Composite paletteContainer;

/**
* @since 3.21
*/
protected final Composite paletteContainer;
private PaletteViewer pViewer;
private PaletteViewer externalViewer;
private IMemento capturedPaletteState;
private Control graphicalControl;
private final Composite sash;
/**
* @since 3.21
*/
protected Control graphicalControl;
/**
* @since 3.21
*/
protected final Composite sash;
private final PaletteViewerProvider provider;
private final FlyoutPreferences prefs;
private Point cachedBounds = new Point(0, 0);
Expand All @@ -147,10 +164,26 @@
* button is visible.
*/
private boolean transferFocus = false;
private int dock = PositionConstants.EAST;
private int paletteState = STATE_HIDDEN;
private int paletteWidth = DEFAULT_PALETTE_SIZE;
private int minWidth = MIN_PALETTE_SIZE;

/**
* @since 3.21
*/
protected int dock = PositionConstants.EAST;

/**
* @since 3.21
*/
protected int paletteState = STATE_HIDDEN;

/**
* @since 3.21
*/
protected int paletteWidth = DEFAULT_PALETTE_SIZE;

/**
* @since 3.21
*/
protected int minWidth = MIN_PALETTE_SIZE;
private int cachedSize = -1;
private int cachedState = -1;
private int cachedLocation = -1;
Expand Down Expand Up @@ -309,7 +342,10 @@
return false;
}

private boolean isInState(int state) {
/**
* @since 3.21
*/
protected boolean isInState(int state) {
return (paletteState & state) != 0;
}

Expand Down Expand Up @@ -907,7 +943,7 @@

private class TitleDragManager extends MouseAdapter implements Listener, MouseTrackListener {
protected boolean switchDock = false;
protected boolean dragging = false;

Check warning on line 946 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
protected int threshold;

public TitleDragManager(Control ctrl) {
Expand Down Expand Up @@ -1565,17 +1601,17 @@
if (cursors[code] == null) {
switch (code) {
case LEFT:
cursors[LEFT] = createCursor(ISharedImages.IMG_OBJS_DND_LEFT_SOURCE,

Check warning on line 1604 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
ISharedImages.IMG_OBJS_DND_LEFT_MASK);

Check warning on line 1605 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
break;
case RIGHT:
cursors[RIGHT] = createCursor(ISharedImages.IMG_OBJS_DND_RIGHT_SOURCE,

Check warning on line 1608 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
ISharedImages.IMG_OBJS_DND_RIGHT_MASK);

Check warning on line 1609 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
break;
default:
case INVALID:
cursors[INVALID] = createCursor(ISharedImages.IMG_OBJS_DND_INVALID_SOURCE,

Check warning on line 1613 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
ISharedImages.IMG_OBJS_DND_INVALID_MASK);

Check warning on line 1614 in org.eclipse.gef/src/org/eclipse/gef/ui/palette/FlyoutPaletteComposite.java

View check run for this annotation

Jenkins - Eclipse GEF / Java Compiler

tycho-compiler:compile

NORMAL:
break;
}
}
Expand Down
Loading