mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 06:50:56 +03:00
DesktopPane: made private methods/fields protected to allow overriding
This commit is contained in:
@@ -47,7 +47,7 @@ public class FlatDesktopPaneUI
|
|||||||
private ComponentListener componentListener;
|
private ComponentListener componentListener;
|
||||||
|
|
||||||
// list of iconified internal frames, which define the order of icons in dock
|
// list of iconified internal frames, which define the order of icons in dock
|
||||||
private List<JInternalFrame> iconifiedFrames;
|
protected List<JInternalFrame> iconifiedFrames;
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
return new FlatDesktopPaneUI();
|
return new FlatDesktopPaneUI();
|
||||||
@@ -67,7 +67,7 @@ public class FlatDesktopPaneUI
|
|||||||
componentListener = new ComponentAdapter() {
|
componentListener = new ComponentAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void componentResized( ComponentEvent e ) {
|
public void componentResized( ComponentEvent e ) {
|
||||||
layoutDesktopIcons();
|
layoutDock();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
desktop.addComponentListener( componentListener );
|
desktop.addComponentListener( componentListener );
|
||||||
@@ -106,7 +106,7 @@ public class FlatDesktopPaneUI
|
|||||||
super.uninstallDesktopManager();
|
super.uninstallDesktopManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void layoutDesktopIcons() {
|
protected void layoutDock() {
|
||||||
if( iconifiedFrames == null || iconifiedFrames.isEmpty() )
|
if( iconifiedFrames == null || iconifiedFrames.isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -133,23 +133,23 @@ public class FlatDesktopPaneUI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToDock( JInternalFrame f ) {
|
protected void addToDock( JInternalFrame f ) {
|
||||||
if( iconifiedFrames == null )
|
if( iconifiedFrames == null )
|
||||||
iconifiedFrames = new ArrayList<>();
|
iconifiedFrames = new ArrayList<>();
|
||||||
|
|
||||||
if( !iconifiedFrames.contains( f ) )
|
if( !iconifiedFrames.contains( f ) )
|
||||||
iconifiedFrames.add( f );
|
iconifiedFrames.add( f );
|
||||||
layoutDesktopIcons();
|
layoutDock();
|
||||||
|
|
||||||
((FlatDesktopIconUI)f.getDesktopIcon().getUI()).updateDockIcon();
|
((FlatDesktopIconUI)f.getDesktopIcon().getUI()).updateDockIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeFromDock( JInternalFrame f ) {
|
protected void removeFromDock( JInternalFrame f ) {
|
||||||
if( iconifiedFrames == null )
|
if( iconifiedFrames == null )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
iconifiedFrames.remove( f );
|
iconifiedFrames.remove( f );
|
||||||
layoutDesktopIcons();
|
layoutDock();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---- class FlatDesktopManager -------------------------------------------
|
//---- class FlatDesktopManager -------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user