1010import java .awt .event .MouseEvent ;
1111import java .beans .PropertyChangeEvent ;
1212import java .beans .PropertyChangeListener ;
13+ import java .lang .reflect .Field ;
1314import java .lang .reflect .InvocationTargetException ;
1415import java .lang .reflect .Method ;
1516import java .nio .file .Path ;
2122import java .util .prefs .Preferences ;
2223import java .util .stream .Stream ;
2324import javax .swing .*;
25+ import javax .swing .border .TitledBorder ;
2426import javax .swing .event .ChangeListener ;
2527import javax .swing .event .MenuEvent ;
2628import javax .swing .event .MenuListener ;
5254import de .uka .ilkd .key .gui .settings .SettingsManager ;
5355import de .uka .ilkd .key .gui .smt .DropdownSelectionButton ;
5456import de .uka .ilkd .key .gui .sourceview .SourceViewFrame ;
55- import de .uka .ilkd .key .gui .utilities .GuiUtilities ;
5657import de .uka .ilkd .key .gui .utilities .LruCached ;
57- import de .uka .ilkd .key .proof .Goal ;
58- import de .uka .ilkd .key .proof .Node ;
59- import de .uka .ilkd .key .proof .Proof ;
60- import de .uka .ilkd .key .proof .ProofEvent ;
58+ import de .uka .ilkd .key .proof .*;
6159import de .uka .ilkd .key .settings .FeatureSettings ;
6260import de .uka .ilkd .key .settings .GeneralSettings ;
6361import de .uka .ilkd .key .settings .ProofIndependentSettings ;
@@ -102,7 +100,7 @@ public final class MainWindow extends JFrame {
102100 * Tooltip for auto mode button.
103101 */
104102 public static final String AUTO_MODE_TEXT = "Start/stop automated proof search" ;
105- private static final long serialVersionUID = 5853419918923902636L ;
103+
106104 private static final String PARA =
107105 "<p style=\" font-family: lucida;font-size: 12pt;font-weight: bold\" >" ;
108106
@@ -317,11 +315,12 @@ private MainWindow() {
317315 currentGoalView = new CurrentGoalView (this );
318316 emptySequent = new EmptySequent (this );
319317 sequentViewSearchBar = new SequentViewSearchBar (emptySequent );
320- proofListView = new JScrollPane ();
321318 autoModeAction = new AutoModeAction (this );
322319 mainFrame = new MainFrame (this , emptySequent );
323320 sourceViewFrame = new SourceViewFrame (this );
324321 proofList = new TaskTree (mediator );
322+ proofListView = new JScrollPane (proofList );
323+
325324 notificationManager = new NotificationManager (mediator , this );
326325 recentFileMenu = new RecentFileMenu (mediator );
327326
@@ -448,10 +447,6 @@ private static void updateLookAndFeel() {
448447 for (Window w : Window .getWindows ()) {
449448 SwingUtilities .updateComponentTreeUI (w );
450449 }
451-
452- if (instance != null ) {
453- // SwingUtilities.updateComponentTreeUI(instance);
454- }
455450 }
456451
457452 /**
@@ -484,36 +479,12 @@ public TermLabelVisibilityManager getVisibleTermLabels() {
484479 */
485480 private void applyGnomeWorkaround () {
486481 Toolkit xToolkit = Toolkit .getDefaultToolkit ();
487- java . lang . reflect . Field awtAppClassNameField ;
482+ Field awtAppClassNameField ;
488483 try {
489484 awtAppClassNameField = xToolkit .getClass ().getDeclaredField ("awtAppClassName" );
490485 awtAppClassNameField .setAccessible (true );
491486 awtAppClassNameField .set (xToolkit , "KeY" );
492- } catch (Exception e ) {
493- }
494- }
495-
496- /**
497- * Tries to set the configured look and feel if the option is activated.
498- */
499- private void setLaF () {
500- try {
501- String className =
502- ProofIndependentSettings .DEFAULT_INSTANCE .getViewSettings ().getLookAndFeel ();
503- // only set look and feel if configured
504- // (previous KeY versions stored [no value set] as "null")
505- if (className != null && !className .equals ("null" )) {
506- UIManager .setLookAndFeel (className );
507-
508- // Workarounds for GTK+
509- // TODO: check whether they apply to other LaFs
510- UIManager .put ("Slider.paintValue" , Boolean .FALSE );
511- UIManager .put ("Menu.background" , Color .GRAY ); // menu background is still white....
512-
513- SwingUtilities .updateComponentTreeUI (this );
514- }
515- } catch (Exception e ) {
516- LOGGER .error ("failed to set look and feel " , e );
487+ } catch (Exception ignored ) {
517488 }
518489 }
519490
@@ -615,30 +586,11 @@ private void layoutMain() {
615586
616587 getContentPane ().add (toolBarPanel , BorderLayout .PAGE_START );
617588
618- proofListView .setPreferredSize (new java . awt . Dimension (350 , 100 ));
619- GuiUtilities . paintEmptyViewComponent ( proofListView , "Proofs" );
589+ proofListView .setPreferredSize (new Dimension (350 , 100 ));
590+ proofListView . setBorder ( new TitledBorder ( "Proofs" ) );
620591
621- // JSplitPane leftPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, proofListView,
622- // mainWindowTabbedPane);
623- // leftPane.setName("leftPane");
624- // leftPane.setOneTouchExpandable(true);
625-
626- // JPanel rightPane = new JPanel();
627- // rightPane.setLayout(new BorderLayout());
628- // rightPane.add(mainFrame, BorderLayout.CENTER);
629592 mainFrame .add (sequentViewSearchBar , BorderLayout .SOUTH );
630593
631- // JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, rightPane, sourceView);
632- // pane.setResizeWeight(0.5);
633- // pane.setOneTouchExpandable(true);
634- // pane.setName("split2");
635-
636- // JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPane, pane);
637- // splitPane.setResizeWeight(0); // the right pane is more important
638- // splitPane.setOneTouchExpandable(true);
639- // splitPane.setName("splitPane");
640- // getContentPane().add(splitPane, BorderLayout.CENTER);
641-
642594 dockControl .putProperty (StackDockStation .TAB_PLACEMENT , TabPlacement .TOP_OF_DOCKABLE );
643595
644596 getContentPane ().add (dockControl .getContentArea ());
@@ -888,7 +840,7 @@ public void makePrettyView() {
888840 SwingUtilities .invokeLater (this ::updateSequentView );
889841 }
890842
891- private void addToProofList (de . uka . ilkd . key . proof . ProofAggregate plist ) {
843+ private void addToProofList (ProofAggregate plist ) {
892844 proofList .addProof (plist );
893845 // TODO/Check: the code below emulates phantom actions. Check if this can be solved
894846 // differently
@@ -899,9 +851,6 @@ private void addToProofList(de.uka.ilkd.key.proof.ProofAggregate plist) {
899851 for (Proof proof : plist .getProofs ()) {
900852 new ProofLoadUserAction (getMediator (), proof ).actionPerformed (null );
901853 }
902- // GUI
903- proofList .setSize (proofList .getPreferredSize ());
904- proofListView .setViewportView (proofList );
905854 }
906855
907856 /**
@@ -1225,7 +1174,7 @@ public CurrentGoalView getGoalView() {
12251174 return currentGoalView ;
12261175 }
12271176
1228- public void addProblem (final de . uka . ilkd . key . proof . ProofAggregate plist ) {
1177+ public void addProblem (final ProofAggregate plist ) {
12291178 Runnable guiUpdater = () -> {
12301179 disableCurrentGoalView = true ;
12311180 addToProofList (plist );
0 commit comments