
net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DesktopStyle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squirrel-sql Show documentation
Show all versions of squirrel-sql Show documentation
This is the jar that contains the main application classes which are very specific to
SQuirreLSQL.
package net.sourceforge.squirrel_sql.client.gui.desktopcontainer;
import net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences;
public class DesktopStyle
{
private StyleEnum _desktopStyle = null;
public DesktopStyle(SquirrelPreferences prefs)
{
_desktopStyle = StyleEnum.INTERNAL_FRAME_STYLE;
if(prefs.getTabbedStyle())
{
_desktopStyle = StyleEnum.DOCK_TAB_STYLE;
}
else if(prefs.getShowTabbedStyleHint())
{
TabbedStyleHintController ctrlHint = new TabbedStyleHintController();
if(ctrlHint.isUseTabbedLayout())
{
prefs.setTabbedStyle(true);
prefs.save();
_desktopStyle = StyleEnum.DOCK_TAB_STYLE;
}
else if(ctrlHint.isDontShowAgain())
{
prefs.setShowTabbedStyleHint(false);
prefs.save();
}
}
}
public boolean isDockTabStyle()
{
return StyleEnum.DOCK_TAB_STYLE == _desktopStyle;
}
public boolean isInternalFrameStyle()
{
return StyleEnum.INTERNAL_FRAME_STYLE == _desktopStyle;
}
public boolean supportsLayers()
{
return _desktopStyle._supportsLayers;
}
public static enum StyleEnum
{
DOCK_TAB_STYLE(false),
INTERNAL_FRAME_STYLE(true),;
private boolean _supportsLayers;
StyleEnum(boolean supportsLayers)
{
_supportsLayers = supportsLayers;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy