Package jadx.gui.ui.tab.dnd
Class TabDndController
- java.lang.Object
-
- jadx.gui.ui.tab.dnd.TabDndController
-
public class TabDndController extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected intdragTabIndexprotected booleandrawGhostprotected booleanpaintScrollTriggerAreasprotected java.awt.RectanglerectBackwardprotected java.awt.RectanglerectForward
-
Constructor Summary
Constructors Constructor Description TabDndController(TabbedPane pane, JadxSettings settings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TabDndGhostPanegetDndGhostPane()protected java.awt.RectanglegetTabAreaBounds()protected intgetTargetTabIndex(java.awt.Point glassPt)Finds the tab index by cursor position.protected voidinitGlassPane(java.awt.Point tabPt)booleanisDragging()static booleanisHorizontalTabPlacement(int tabPlacement)voidloadSettings()voidonPaintGlassPane(java.awt.Graphics2D g)booleanonStartDrag(java.awt.Point pt)voidscrollIfNeeded(java.awt.Point glassPt)Check if dragging near edges and scroll to according direction through programmatically clicking system's scroll buttons.voidsetDragging(boolean dragging)protected voidswapTabs(int oldIdx, int newIdx)protected voidupdateTargetMark(int tabIdx)
-
-
-
Constructor Detail
-
TabDndController
public TabDndController(TabbedPane pane, JadxSettings settings)
-
-
Method Detail
-
isHorizontalTabPlacement
public static boolean isHorizontalTabPlacement(int tabPlacement)
-
scrollIfNeeded
public void scrollIfNeeded(java.awt.Point glassPt)
Check if dragging near edges and scroll to according direction through programmatically clicking system's scroll buttons.- Parameters:
glassPt- Cursor position in TabbedPane coordinates.
-
getTargetTabIndex
protected int getTargetTabIndex(java.awt.Point glassPt)
Finds the tab index by cursor position. If tabs first half contains the point, then its index is returned. Second half means inserting at next index.- Parameters:
glassPt- Cursor position in TabbedPane coordinates.- Returns:
- Tab index.
-
swapTabs
protected void swapTabs(int oldIdx, int newIdx)
-
updateTargetMark
protected void updateTargetMark(int tabIdx)
-
initGlassPane
protected void initGlassPane(java.awt.Point tabPt)
-
getTabAreaBounds
protected java.awt.Rectangle getTabAreaBounds()
-
onPaintGlassPane
public void onPaintGlassPane(java.awt.Graphics2D g)
-
onStartDrag
public boolean onStartDrag(java.awt.Point pt)
-
loadSettings
public void loadSettings()
-
isDragging
public boolean isDragging()
-
setDragging
public void setDragging(boolean dragging)
-
getDndGhostPane
public TabDndGhostPane getDndGhostPane()
-
-