Lines 56-62
Link Here
|
56 |
import org.netbeans.swing.tabcontrol.plaf.EqualPolygon; |
56 |
import org.netbeans.swing.tabcontrol.plaf.EqualPolygon; |
57 |
import org.openide.util.WeakListeners; |
57 |
import org.openide.util.WeakListeners; |
58 |
import org.openide.windows.TopComponent; |
58 |
import org.openide.windows.TopComponent; |
59 |
import java.awt.Image; |
|
|
60 |
import org.netbeans.core.windows.view.ui.slides.SlideController; |
59 |
import org.netbeans.core.windows.view.ui.slides.SlideController; |
61 |
import javax.swing.*; |
60 |
import javax.swing.*; |
62 |
import javax.swing.event.ChangeEvent; |
61 |
import javax.swing.event.ChangeEvent; |
Lines 65-73
Link Here
|
65 |
import java.util.ArrayList; |
64 |
import java.util.ArrayList; |
66 |
import java.util.Arrays; |
65 |
import java.util.Arrays; |
67 |
import org.netbeans.core.windows.ModeImpl; |
66 |
import org.netbeans.core.windows.ModeImpl; |
|
|
67 |
import org.netbeans.core.windows.Switches; |
68 |
import org.netbeans.core.windows.actions.ActionUtils; |
68 |
import org.netbeans.core.windows.actions.ActionUtils; |
69 |
import org.netbeans.swing.tabcontrol.TabDisplayer; |
69 |
import org.netbeans.swing.tabcontrol.TabDisplayer; |
70 |
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbed; |
70 |
import org.netbeans.swing.tabcontrol.WinsysInfoForTabbedContainer; |
71 |
import org.netbeans.swing.tabcontrol.event.TabActionEvent; |
71 |
import org.netbeans.swing.tabcontrol.event.TabActionEvent; |
72 |
import org.openide.util.ChangeSupport; |
72 |
import org.openide.util.ChangeSupport; |
73 |
|
73 |
|
Lines 90-96
Link Here
|
90 |
|
90 |
|
91 |
/** Creates a new instance of TabbedAdapter */ |
91 |
/** Creates a new instance of TabbedAdapter */ |
92 |
public TabbedAdapter (int type) { |
92 |
public TabbedAdapter (int type) { |
93 |
super (null, type, new WinsysInfo()); |
93 |
super (null, type, new WinsysInfo(type)); |
94 |
getSelectionModel().addChangeListener(new ChangeListener() { |
94 |
getSelectionModel().addChangeListener(new ChangeListener() { |
95 |
public void stateChanged (ChangeEvent ce) { |
95 |
public void stateChanged (ChangeEvent ce) { |
96 |
int idx = getSelectionModel().getSelectedIndex(); |
96 |
int idx = getSelectionModel().getSelectedIndex(); |
Lines 128-134
Link Here
|
128 |
"RequestAttention on component unknown to container: " + tc); //NOI18N |
128 |
"RequestAttention on component unknown to container: " + tc); //NOI18N |
129 |
} |
129 |
} |
130 |
} |
130 |
} |
131 |
|
131 |
|
132 |
public void cancelRequestAttention (TopComponent tc) { |
132 |
public void cancelRequestAttention (TopComponent tc) { |
133 |
int idx = indexOf(tc); |
133 |
int idx = indexOf(tc); |
134 |
if (idx >= 0) { |
134 |
if (idx >= 0) { |
Lines 460-466
Link Here
|
460 |
public Action[] getPopupActions(Action[] defaultActions, int tabIndex) { |
460 |
public Action[] getPopupActions(Action[] defaultActions, int tabIndex) { |
461 |
boolean isDocked = WindowManagerImpl.getInstance().isDocked(getTopComponentAt(tabIndex)); |
461 |
boolean isDocked = WindowManagerImpl.getInstance().isDocked(getTopComponentAt(tabIndex)); |
462 |
// no auto hide for editors and floating views |
462 |
// no auto hide for editors and floating views |
463 |
if (TabbedContainer.TYPE_EDITOR == getType() || !isDocked) { |
463 |
if (TabbedContainer.TYPE_EDITOR == getType() || !isDocked || !Switches.isTopComponentSlidingEnabled()) { |
464 |
return defaultActions; |
464 |
return defaultActions; |
465 |
} |
465 |
} |
466 |
int actionCount = defaultActions.length; |
466 |
int actionCount = defaultActions.length; |
Lines 509-516
Link Here
|
509 |
|
509 |
|
510 |
/********* implementation of WinsysInfoForTabbed ********/ |
510 |
/********* implementation of WinsysInfoForTabbed ********/ |
511 |
|
511 |
|
512 |
static class WinsysInfo implements WinsysInfoForTabbed { |
512 |
static class WinsysInfo extends WinsysInfoForTabbedContainer { |
513 |
|
513 |
private int containerType; |
|
|
514 |
public WinsysInfo( int containerType ) { |
515 |
this.containerType = containerType; |
516 |
} |
517 |
|
514 |
public Object getOrientation (Component comp) { |
518 |
public Object getOrientation (Component comp) { |
515 |
WindowManagerImpl wmi = WindowManagerImpl.getInstance(); |
519 |
WindowManagerImpl wmi = WindowManagerImpl.getInstance(); |
516 |
// don't show pin button in separate views |
520 |
// don't show pin button in separate views |
Lines 535-540
Link Here
|
535 |
public boolean inMaximizedMode (Component comp) { |
539 |
public boolean inMaximizedMode (Component comp) { |
536 |
return isInMaximizedMode(comp); |
540 |
return isInMaximizedMode(comp); |
537 |
} |
541 |
} |
|
|
542 |
|
543 |
@Override |
544 |
public boolean isTopComponentSlidingEnabled() { |
545 |
return Switches.isTopComponentSlidingEnabled(); |
546 |
} |
547 |
|
548 |
@Override |
549 |
public boolean isTopComponentClosingEnabled() { |
550 |
if( containerType == Constants.MODE_KIND_EDITOR ) |
551 |
return Switches.isEditorTopComponentClosingEnabled(); |
552 |
else |
553 |
return Switches.isViewTopComponentClosingEnabled(); |
554 |
} |
538 |
|
555 |
|
539 |
} // end of LocInfo |
556 |
} // end of LocInfo |
540 |
|
557 |
|