Changeset 7528 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2014-09-12T01:04:39+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
r6743 r7528 16 16 import javax.swing.JComponent; 17 17 import javax.swing.JDialog; 18 import javax.swing.JLabel; 18 19 import javax.swing.JOptionPane; 19 20 import javax.swing.JPanel; … … 40 41 private HistoryBrowser browser; 41 42 private CloseAction closeAction; 43 private JLabel titleLabel; 42 44 43 45 /** … … 59 61 } 60 62 63 @Override 64 public void setTitle(String title) { 65 super.setTitle(title); 66 if (titleLabel != null) { 67 titleLabel.setText(title); 68 } 69 } 70 61 71 /** 62 72 * builds the GUI 63 *64 73 */ 65 74 protected void build() { 66 75 setLayout(new BorderLayout()); 76 77 titleLabel = new JLabel(); 78 titleLabel.setHorizontalAlignment(JLabel.CENTER); 79 add(titleLabel, BorderLayout.NORTH); 80 67 81 browser = new HistoryBrowser(); 68 82 add(browser, BorderLayout.CENTER); … … 92 106 93 107 /** 94 * constructor108 * Constructs a new {@code HistoryBrowserDialog}. 95 109 * 96 * @param history 110 * @param history the history to be displayed 97 111 */ 98 112 public HistoryBrowserDialog(History history) { … … 101 115 setHistory(history); 102 116 renderTitle(history); 117 pack(); 118 if (getInsets().top > 0) { 119 titleLabel.setVisible(false); 120 } 103 121 HistoryDataSet.getInstance().addHistoryDataSetListener(this); 104 122 addWindowListener(new WindowClosingAdapter()); … … 106 124 107 125 /** 108 * sets the current history126 * Sets the current history. 109 127 * @param history 110 128 */ … … 113 131 } 114 132 133 /** 134 * Removes this history browser model as listener for data change and layer change events. 135 */ 115 136 public void unlinkAsListener() { 116 137 getHistoryBrowser().getModel().unlinkAsListener(); … … 174 195 } 175 196 197 /** 198 * Replies the history browser. 199 * @return the history browser 200 */ 176 201 public HistoryBrowser getHistoryBrowser() { 177 202 return browser; -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r7527 r7528 12 12 import java.util.Map; 13 13 14 import javax.swing.JDialog;15 import javax.swing.JFrame;16 14 import javax.swing.JOptionPane; 17 15 import javax.swing.SwingUtilities; 18 import javax.swing.UIManager;19 16 20 17 import org.openstreetmap.josm.Main; … … 70 67 placeOnScreen(dialog); 71 68 dialog.setVisible(true); 72 // Debug stuff for #1046273 if (Main.isDebugEnabled()) {74 Main.debug("#10462 - JDialog.isDefaultLookAndFeelDecorated: "+JDialog.isDefaultLookAndFeelDecorated());75 Main.debug("#10462 - JFrame.isDefaultLookAndFeelDecorated: "+JFrame.isDefaultLookAndFeelDecorated());76 Main.debug("#10462 - dialog.isUndecorated: "+dialog.isUndecorated());77 Main.debug("#10462 - UIManager.getLookAndFeel: "+UIManager.getLookAndFeel());78 Main.debug("#10462 - LookAndFeel.getSupportsWindowDecorations: "+UIManager.getLookAndFeel().getSupportsWindowDecorations());79 Main.debug("#10462 - JRootPane.getWindowDecorationStyle: "+dialog.getRootPane().getWindowDecorationStyle());80 Main.debug("#10462 - Window.getIconImages: "+dialog.getIconImages());81 Main.debug("#10462 - Dialog.getTitle: "+dialog.getTitle());82 Main.debug("#10462 - Dialog.getInsets: "+dialog.getInsets());83 }84 69 dialogs.put(id, dialog); 85 70 }
Note:
See TracChangeset
for help on using the changeset viewer.