List of usage examples for com.jgoodies.looks Options setPopupDropShadowEnabled
public static void setPopupDropShadowEnabled(boolean b)
From source file:ro.fortsoft.momo.JcrBrowserFrame.java
License:Apache License
private void initComponents() { setLayout(new BorderLayout()); hierarchyPanel = new HierarchyPanel(); consolePanel = new ConsolePanel(); tabbedPane = new JTabbedPane(); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, hierarchyPanel, consolePanel); tabbedPane.setBorder(new CompoundBorder(new EmptyBorder(3, 3, 3, 3), new DropShadowBorder())); tabbedPane.addTab("Hierarchy", splitPane); queryPanel = new QueryPanel(); tabbedPane.addTab("Query", queryPanel); add(tabbedPane, BorderLayout.CENTER); // set image for application setIconImage(ImageUtils.getImage("eye.png")); // do some things on tree node selection hierarchyPanel.getHierarchyTree().addTreeSelectionListener(consolePanel); getRootPaneExt().setStatusBar(createStatusBar()); Options.setPopupDropShadowEnabled(true); // add drop shadow to popup menu }
From source file:ro.nextreports.designer.MainFrame.java
License:Apache License
private void initComponents() { Globals.setMainFrame(this); // better text visualization for disabled components Options.setPopupDropShadowEnabled(true); // add drop shadow to popup menu UIDefaults uiDefaults = UIManager.getDefaults(); uiDefaults.put("ComboBox.disabledForeground", Color.DARK_GRAY); uiDefaults.put("TextField.inactiveForeground", Color.DARK_GRAY); uiDefaults.put("TextArea.inactiveBackground", Color.WHITE); uiDefaults.put("FormattedTextField.inactiveForeground", Color.DARK_GRAY); uiDefaults.put("PasswordField.inactiveForeground", Color.DARK_GRAY); uiDefaults.put("CheckBox.disabledText", Color.DARK_GRAY); // internationalization UIManager.put("OptionPane.yesButtonText", I18NSupport.getString("optionpanel.yes")); UIManager.put("OptionPane.cancelButtonText", I18NSupport.getString("optionpanel.cancel")); UIManager.put("OptionPane.noButtonText", I18NSupport.getString("optionpanel.no")); UIManager.put("OptionPane.okButtonText", I18NSupport.getString("optionpanel.ok")); UIManager.put("OptionPane.messageDialogTitle", I18NSupport.getString("optionpanel.message")); UIManager.put("ColorChooser.okText", I18NSupport.getString("colorchooser.ok")); UIManager.put("ColorChooser.cancelText", I18NSupport.getString("colorchooser.cancel")); UIManager.put("ColorChooser.resetText", I18NSupport.getString("colorchooser.reset")); UIManager.put("FileChooser.saveInLabelText", I18NSupport.getString("FileChooser.saveInLabelText")); UIManager.put("FileChooser.fileNameLabelText", I18NSupport.getString("FileChooser.fileNameLabelText")); UIManager.put("FileChooser.folderNameLabelText", I18NSupport.getString("FileChooser.folderNameLabelText")); UIManager.put("FileChooser.filesOfTypeLabelText", I18NSupport.getString("FileChooser.filesOfTypeLabelText")); UIManager.put("FileChooser.saveButtonText", I18NSupport.getString("FileChooser.saveButtonText")); UIManager.put("FileChooser.cancelButtonText", I18NSupport.getString("FileChooser.cancelButtonText")); UIManager.put("FileChooser.saveButtonToolTipText", I18NSupport.getString("FileChooser.saveButtonToolTipText")); UIManager.put("FileChooser.cancelButtonToolTipText", I18NSupport.getString("FileChooser.cancelButtonToolTipText")); UIManager.put("FileChooser.upFolderToolTipText", I18NSupport.getString("FileChooser.upFolderToolTipText")); UIManager.put("FileChooser.homeFolderToolTipText", I18NSupport.getString("FileChooser.homeFolderToolTipText")); UIManager.put("FileChooser.newFolderToolTipText", I18NSupport.getString("FileChooser.newFolderToolTipText")); UIManager.put("FileChooser.listViewButtonToolTipText", I18NSupport.getString("FileChooser.listViewButtonToolTipText")); UIManager.put("FileChooser.detailsViewButtonToolTipText", I18NSupport.getString("FileChooser.detailsViewButtonToolTipText")); // docking/* w w w . jav a 2 s .co m*/ UIManager.put(MyDoggyKeySpace.DRAG_ENABLED, false); // inside connections dir are kept the queries/reports for every data source DefaultDataSourceManager.getInstance().load(); File connections = new File(FileReportPersistence.CONNECTIONS_DIR); if (!connections.exists()) { connections.mkdir(); } // inside reports dir are kept the generated reports File reports = new File(ExportAction.REPORTS_DIR); if (!reports.exists()) { reports.mkdir(); } // create workspace panel workspacePanel = new JXPanel(new CardLayout()); // create query builder panel before menu(!!! for docking) qbPanel = new QueryBuilderPanel(); qbPanel.initWorkspace(); setLayout(new BorderLayout()); // add(new MainToolBar(), BorderLayout.NORTH); setToolBar(new MainToolBar()); statusBar = new JXStatusBar(); //statusBar.add(new JXLabel(""), JXStatusBar.Constraint.ResizeBehavior.FILL); statusBar.add(new JXLabel(""), new JXStatusBar.Constraint(JXStatusBar.Constraint.ResizeBehavior.FILL, new Insets(0, 5, 2, 2))); statusBar.add(new MemoryStatus()); statusBar.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); setStatusBar(statusBar); WorkspaceManager workspaceManager = WorkspaceManager.getInstance(); workspacePanel.add((Component) workspaceManager.getQueryWorkspace().getToolWindowManager(), WorkspaceManager.QUERY_WORKSPACE); workspacePanel.add((Component) workspaceManager.getReportWorkspace().getToolWindowManager(), WorkspaceManager.REPORT_WORKSPACE); workspacePanel.add((Component) workspaceManager.getChartWorkspace().getToolWindowManager(), WorkspaceManager.CHART_WORKSPACE); add(workspacePanel, BorderLayout.CENTER); DataSource ds = DefaultDataSourceManager.getInstance().getConnectedDataSource(); if (ds != null) { setStatusBarMessage( "<html>" + I18NSupport.getString("datasource.active") + " <b>" + ds.getName() + "</b></html>"); } setJMenuBar(new MainMenuBar()); Globals.getMainMenuBar().actionUpdate(ds != null); Globals.getMainToolBar().actionUpdate(ds != null); String systemReport = Globals.getSystemReport(); String systemChart = Globals.getSystemChart(); String systemPath = Globals.getSystemPath(); if (systemReport != null) { openSystemReport(systemReport, systemPath); } else if (systemChart != null) { openSystemChart(systemChart, systemPath); } }