public void customExceptionOccurred(Exception exception) { // Continue anyways. window.getStatusBar().setText("Could not save platform settings: "+exception); pcc.dispose(); } });
/** * Set a text to be displayed in the status bar. The text will be removed * automatically after some delay (or replaced by some other text). */ public void setStatusText(String text) { controlcenter.getWindow().getStatusBar().setText(text); }
/** * Set a text to be displayed in the status bar. The text will be removed * automatically after some delay (or replaced by some other text). */ public void setStatusText(String text) { controlcenter.getWindow().getStatusBar().setText(text); }
public void customExceptionOccurred(Exception exception) { // Continue anyways. window.getStatusBar().setText("Could not save platform settings: "+exception); pcc.dispose(); } });
/** * Main for testing. */ public static void main(String[] args) { JFrame f = new JFrame(); StatusBar sb = new StatusBar(); f.add("South", sb); f.setSize(200, 200); f.setVisible(true); sb.setText("hallo"); Component b = new Button("b"); sb.addStatusComponent("a", new Button("a")); sb.addStatusComponent("b", b); sb.addStatusComponent("c", new Button("c")); sb.removeStatusComponent("b"); } }
public void customResultAvailable(Object result) { window.getStatusBar().setText("Saved platform settings for: "+pcc.getPlatformAccess().getComponentIdentifier().getPlatformName()); pcc.dispose(); } public void customExceptionOccurred(Exception exception)
public void customResultAvailable(Object result) { window.getStatusBar().setText("Saved platform settings for: "+pcc.getPlatformAccess().getComponentIdentifier().getPlatformName()); pcc.dispose(); } public void customExceptionOccurred(Exception exception)
/** * Close a platform control center. */ public void closePlatform(final PlatformControlCenter pcc) { pccs.remove(pcc.getPlatformAccess().getComponentIdentifier()); window.getStatusBar().setText("Saving platform settings for: "+pcc.getPlatformAccess().getComponentIdentifier().getPlatformName()); window.closePlatformPanel(pcc); // Do not save settings when closing remote platform window boolean allowed = pcc.getPlatformAccess().getComponentIdentifier().getRoot().equals(jccaccess.getComponentIdentifier().getRoot()); // System.out.println("allowed: "+allowed); IFuture saved = isSaveOnExit() && allowed? pcc.savePlatformProperties() : IFuture.DONE; saved.addResultListener(new SwingDefaultResultListener() { public void customResultAvailable(Object result) { window.getStatusBar().setText("Saved platform settings for: "+pcc.getPlatformAccess().getComponentIdentifier().getPlatformName()); pcc.dispose(); } public void customExceptionOccurred(Exception exception) { // Continue anyways. window.getStatusBar().setText("Could not save platform settings: "+exception); pcc.dispose(); } }); }
/** * Close a platform control center. */ public void closePlatform(final PlatformControlCenter pcc) { pccs.remove(pcc.getPlatformAccess().getComponentIdentifier()); window.getStatusBar().setText("Saving platform settings for: "+pcc.getPlatformAccess().getComponentIdentifier().getPlatformName()); window.closePlatformPanel(pcc); // Do not save settings when closing remote platform window boolean allowed = pcc.getPlatformAccess().getComponentIdentifier().getRoot().equals(jccaccess.getComponentIdentifier().getRoot()); // System.out.println("allowed: "+allowed); IFuture saved = isSaveOnExit() && allowed? pcc.savePlatformProperties() : IFuture.DONE; saved.addResultListener(new SwingDefaultResultListener() { public void customResultAvailable(Object result) { window.getStatusBar().setText("Saved platform settings for: "+pcc.getPlatformAccess().getComponentIdentifier().getPlatformName()); pcc.dispose(); } public void customExceptionOccurred(Exception exception) { // Continue anyways. window.getStatusBar().setText("Could not save platform settings: "+exception); pcc.dispose(); } }); }