2021-06-26 01:13:46 +00:00
|
|
|
package the.bytecode.club.bytecodeviewer.gui.components;
|
2015-11-11 04:16:45 +00:00
|
|
|
|
2021-07-16 21:49:32 +00:00
|
|
|
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
|
2021-08-26 21:59:07 +00:00
|
|
|
import javax.swing.BorderFactory;
|
|
|
|
import javax.swing.JInternalFrame;
|
2021-07-16 21:49:32 +00:00
|
|
|
import the.bytecode.club.bytecodeviewer.Configuration;
|
|
|
|
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
|
2021-08-05 10:35:23 +00:00
|
|
|
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
|
2021-07-16 21:49:32 +00:00
|
|
|
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
|
|
|
|
2015-11-11 04:16:45 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
|
|
|
* Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
/**
|
2021-06-21 23:37:55 +00:00
|
|
|
* Used to represent all the panes inside of Bytecode Viewer.
|
2018-01-31 15:41:24 +00:00
|
|
|
*
|
2015-11-11 04:16:45 +00:00
|
|
|
* @author Konloch
|
|
|
|
* @author WaterWolf
|
2021-07-04 07:04:08 +00:00
|
|
|
* @since 09/26/2011
|
2015-11-11 04:16:45 +00:00
|
|
|
*/
|
2021-06-26 03:33:06 +00:00
|
|
|
|
2021-06-21 23:37:55 +00:00
|
|
|
public abstract class VisibleComponent extends JInternalFrame
|
|
|
|
{
|
|
|
|
public VisibleComponent(final String title)
|
|
|
|
{
|
2018-01-31 15:41:24 +00:00
|
|
|
super(title, false, false, false, false);
|
2021-07-16 21:49:32 +00:00
|
|
|
this.setDefaultIcon();
|
|
|
|
}
|
2021-08-05 10:35:23 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void updateUI() {
|
|
|
|
if (Configuration.lafTheme != LAFTheme.SYSTEM)
|
|
|
|
setBorder(BorderFactory.createEmptyBorder());
|
|
|
|
else
|
|
|
|
setBorder(null);
|
|
|
|
super.updateUI();
|
|
|
|
}
|
|
|
|
|
2021-07-16 21:49:32 +00:00
|
|
|
public void setDefaultIcon()
|
|
|
|
{
|
|
|
|
try {
|
|
|
|
if(Configuration.showDarkLAFComponentIcons)
|
|
|
|
setFrameIcon(new ThemedSVGIcon(Workspace.class.getResource("/com/github/weisj/darklaf/icons/frame/frame.svg").toURI(), 16, 16));
|
|
|
|
else
|
|
|
|
setFrameIcon(IconResources.jarIcon);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
2018-01-31 15:41:24 +00:00
|
|
|
}
|
2021-07-07 10:39:29 +00:00
|
|
|
|
|
|
|
private static final long serialVersionUID = -6453413772343643526L;
|
2021-08-26 21:59:07 +00:00
|
|
|
}
|