public GuiListener() { GUI.setUILookAndFeel(); frame = new MainDialog(); frame.setVisible(true); }
public MainDialog() throws HeadlessException { super("Hudson slave agent"); ImageIcon background = new ImageIcon(getClass().getResource("Hudson-bust.png")); JPanel foregroundPanel = new JPanel(new BorderLayout(10, 10)); foregroundPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); foregroundPanel.setOpaque(false); statusLabel = new JLabel("",JLabel.TRAILING); foregroundPanel.add(statusLabel, BorderLayout.CENTER); setContentPane(GUI.wrapInBackgroundImage(foregroundPanel, background,JLabel.BOTTOM,JLabel.LEADING)); resetMenuBar(); pack(); setSize(new Dimension(250,150)); getContentPane().setBackground(Color.WHITE); setLocationByPlatform(true); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); }
public void resetMenuBar() { mainMenu = new MainMenu(this); if(mainMenu.getComponentCount()>0) { setJMenuBar(mainMenu); mainMenu.commit(); } else { setJMenuBar(null); if(isVisible()) setVisible(true); // work around for paint problem. see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4949810 } }
public Void call() { if(File.separatorChar=='/') return null; // not Windows if(System.getProperty("hudson.showWindowsServiceInstallLink")==null) return null; // only show this when it makes sense, which is when we run from JNLP dialog = MainDialog.get(); if(dialog==null) return null; // can't find the main window. Maybe not running with GUI // capture the engine engine = Engine.current(); SwingUtilities.invokeLater(new Runnable() { public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } }); return null; }
public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } });
public void run() { // discard all the menu items that might have been added by the master. frame.resetMenuBar(); } });
public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(installer.getDisplayName()); dialog.setGlassPane(glassPane);
public Void call() { if(File.separatorChar=='/') return null; // not Windows if(System.getProperty("hudson.showWindowsServiceInstallLink")==null) return null; // only show this when it makes sense, which is when we run from JNLP dialog = MainDialog.get(); if(dialog==null) return null; // can't find the main window. Maybe not running with GUI // capture the engine engine = Engine.current(); SwingUtilities.invokeLater(new Runnable() { public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } }); return null; }
public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } });
public void run() { // discard all the menu items that might have been added by the master. frame.resetMenuBar(); } });
public MainDialog() throws HeadlessException { super("Hudson slave agent"); ImageIcon background = new ImageIcon(getClass().getResource("Hudson-bust.png")); JPanel foregroundPanel = new JPanel(new BorderLayout(10, 10)); foregroundPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); foregroundPanel.setOpaque(false); statusLabel = new JLabel("",JLabel.TRAILING); foregroundPanel.add(statusLabel, BorderLayout.CENTER); setContentPane(GUI.wrapInBackgroundImage(foregroundPanel, background,JLabel.BOTTOM,JLabel.LEADING)); resetMenuBar(); pack(); setSize(new Dimension(250,150)); getContentPane().setBackground(Color.WHITE); setLocationByPlatform(true); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); }
public void resetMenuBar() { mainMenu = new MainMenu(this); if(mainMenu.getComponentCount()>0) { setJMenuBar(mainMenu); mainMenu.commit(); } else { setJMenuBar(null); if(isVisible()) setVisible(true); // work around for paint problem. see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4949810 } }
public GuiListener() { GUI.setUILookAndFeel(); frame = new MainDialog(); frame.setVisible(true); }
public Void call() { if(File.separatorChar=='/') return null; // not Windows if(System.getProperty("hudson.showWindowsServiceInstallLink")==null) return null; // only show this when it makes sense, which is when we run from JNLP dialog = MainDialog.get(); if(dialog==null) return null; // can't find the main window. Maybe not running with GUI // capture the engine engine = Engine.current(); SwingUtilities.invokeLater(new Runnable() { public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } }); return null; }
public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } });
public void run() { // discard all the menu items that might have been added by the master. frame.resetMenuBar(); } });
public MainDialog() throws HeadlessException { super("Hudson slave agent"); ImageIcon background = new ImageIcon(getClass().getResource("title.png")); JPanel foregroundPanel = new JPanel(new BorderLayout(10, 10)); foregroundPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); foregroundPanel.setOpaque(false); statusLabel = new JLabel("",JLabel.TRAILING); foregroundPanel.add(statusLabel, BorderLayout.CENTER); setContentPane(GUI.wrapInBackgroundImage(foregroundPanel, background,JLabel.BOTTOM,JLabel.LEADING)); resetMenuBar(); pack(); setSize(new Dimension(250,150)); getContentPane().setBackground(Color.WHITE); setLocationByPlatform(true); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); }
public void resetMenuBar() { mainMenu = new MainMenu(this); if(mainMenu.getComponentCount()>0) { setJMenuBar(mainMenu); mainMenu.commit(); } else { setJMenuBar(null); if(isVisible()) setVisible(true); // work around for paint problem. see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4949810 } }
public GuiListener() { GUI.setUILookAndFeel(); frame = new MainDialog(); frame.setVisible(true); }
public Void call() { if (File.separatorChar == '/') { return null; // not Windows } if (System.getProperty("hudson.showWindowsServiceInstallLink") == null) { return null; // only show this when it makes sense, which is when we run from JNLP } dialog = MainDialog.get(); if (dialog == null) { return null; // can't find the main window. Maybe not running with GUI } // capture the engine engine = Engine.current(); SwingUtilities.invokeLater(new Runnable() { public void run() { MainMenu mainMenu = dialog.getMainMenu(); JMenu m = mainMenu.getFileMenu(); JMenuItem menu = new JMenuItem(Messages.WindowsInstallerLink_DisplayName(), KeyEvent.VK_W); menu.addActionListener(WindowsSlaveInstaller.this); m.add(menu); mainMenu.commit(); } }); return null; }