error dialog display issues

This commit is contained in:
Jindra Petk
2013-07-30 06:59:53 +02:00
parent 263763d859
commit 2dfdc1d02c
2 changed files with 21 additions and 16 deletions

View File

@@ -68,10 +68,10 @@ public class ErrorLogFrame extends AppFrame {
Container cnt = getContentPane();
cnt.setLayout(new BorderLayout());
logView.setBackground(Color.white);
logView.setLayout(new ListLayout());
logView.setLayout(new BoxLayout(logView, BoxLayout.Y_AXIS));
cnt.setBackground(Color.white);
cnt.add(new JScrollPane(logView));
cnt.add(new JScrollPane(logView),BorderLayout.NORTH);
handler = new Handler() {
@Override
public void publish(LogRecord record) {
@@ -94,7 +94,7 @@ public class ErrorLogFrame extends AppFrame {
public void run() {
JPanel pan = new JPanel();
pan.setBackground(Color.white);
pan.setLayout(new ListLayout());
pan.setLayout(new BoxLayout(pan, BoxLayout.Y_AXIS));
JComponent detailComponent;
if (detail == null) {
@@ -105,6 +105,7 @@ public class ErrorLogFrame extends AppFrame {
detailTextArea.setOpaque(false);
detailTextArea.setFont(new JLabel().getFont());
detailTextArea.setBackground(Color.white);
//detailTextAre
detailComponent = detailTextArea;
}
JPanel header = new JPanel();
@@ -131,7 +132,7 @@ public class ErrorLogFrame extends AppFrame {
}
});
final JToggleButton expandButton = new JToggleButton(View.getIcon("expand16"));
final JToggleButton expandButton = new JToggleButton(View.getIcon("collapse16"));
expandButton.setFocusPainted(false);
expandButton.setBorderPainted(false);
expandButton.setFocusable(false);
@@ -145,6 +146,7 @@ public class ErrorLogFrame extends AppFrame {
scrollPane = new JScrollPane(detailComponent);
scrollPane.setAlignmentX(0f);
scrollPane.setMinimumSize(new Dimension(getWidth(), 500));
scrollPane.setPreferredSize(new Dimension(getWidth(), 500));
} else {
scrollPane = null;
}
@@ -154,7 +156,12 @@ public class ErrorLogFrame extends AppFrame {
expandButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(expandButton.isSelected()){
expandButton.setIcon(View.getIcon("expand16"));
}
scrollPane.setVisible(expandButton.isSelected());
scrollPane.setMinimumSize(new Dimension(getWidth(), 500));
scrollPane.setSize(new Dimension(getWidth(), 500));
revalidate();
repaint();
}

View File

@@ -253,7 +253,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
private JPanel detailPanel;
private JTextField filterField = new MyTextField("");
private JPanel searchPanel;
private JCheckBox autoDeobfuscateMenuItem;
private JCheckBox miAutoDeobfuscation;
private JPanel displayWithPreview;
private JButton textSaveButton;
private JButton textEditButton;
@@ -431,7 +431,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
JRibbonBand settingsBand = new JRibbonBand(translate("menu.settings"), null);
settingsBand.setResizePolicies((List) Arrays.asList(new CoreRibbonResizePolicies.Mirror(settingsBand.getControlPanel()), new IconRibbonBandResizePolicy(settingsBand.getControlPanel())));
autoDeobfuscateMenuItem = new JCheckBox(translate("menu.settings.autodeobfuscation"));
miAutoDeobfuscation = new JCheckBox(translate("menu.settings.autodeobfuscation"));
//assignListener(autoDeobfuscateMenuItem,"AUTODEOBFUSCATE");
miInternalViewer = new JCheckBox(translate("menu.settings.internalflashviewer"));
@@ -448,7 +448,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
//assignListener(miGotoMainClassOnStartup,"GOTODOCUMENTCLASSONSTARTUP");
settingsBand.addRibbonComponent(new JRibbonComponent(autoDeobfuscateMenuItem));
settingsBand.addRibbonComponent(new JRibbonComponent(miAutoDeobfuscation));
settingsBand.addRibbonComponent(new JRibbonComponent(miInternalViewer));
settingsBand.addRibbonComponent(new JRibbonComponent(miParallelSpeedUp));
settingsBand.addRibbonComponent(new JRibbonComponent(miDecompile));
@@ -639,9 +639,9 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
miDeobfuscation.addActionListener(this);
//autoDeobfuscateMenuItem = new JCheckBoxMenuItem(translate("menu.settings.autodeobfuscation"));
autoDeobfuscateMenuItem.setSelected((Boolean) Configuration.getConfig("autoDeobfuscate", true));
autoDeobfuscateMenuItem.addActionListener(this);
autoDeobfuscateMenuItem.setActionCommand("AUTODEOBFUSCATE");
miAutoDeobfuscation.setSelected((Boolean) Configuration.getConfig("autoDeobfuscate", true));
miAutoDeobfuscation.addActionListener(this);
miAutoDeobfuscation.setActionCommand("AUTODEOBFUSCATE");
JMenuItem miRenameOneIdentifier = new JMenuItem(translate("menu.tools.deobfuscation.globalrename"));
miRenameOneIdentifier.setActionCommand("RENAMEONEIDENTIFIER");
@@ -1445,9 +1445,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
@Override
public void close() throws SecurityException {
}
});
//pack();
});
}
public void enableDrop(boolean value) {
@@ -2402,8 +2400,8 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
break;
case "AUTODEOBFUSCATE":
if (View.showConfirmDialog(this, translate("message.confirm.autodeobfuscate") + "\r\n" + (autoDeobfuscateMenuItem.isSelected() ? translate("message.confirm.on") : translate("message.confirm.off")), translate("message.confirm"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
Configuration.setConfig("autoDeobfuscate", autoDeobfuscateMenuItem.isSelected());
if (View.showConfirmDialog(this, translate("message.confirm.autodeobfuscate") + "\r\n" + (miAutoDeobfuscation.isSelected() ? translate("message.confirm.on") : translate("message.confirm.off")), translate("message.confirm"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
Configuration.setConfig("autoDeobfuscate", miAutoDeobfuscation.isSelected());
clearCache();
if (abcPanel != null) {
abcPanel.reload();
@@ -2411,7 +2409,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel
reload(true);
doFilter();
} else {
autoDeobfuscateMenuItem.setSelected(!autoDeobfuscateMenuItem.isSelected());
miAutoDeobfuscation.setSelected(!miAutoDeobfuscation.isSelected());
}
break;
case "EXIT":