List of usage examples for javax.swing SwingConstants SOUTH
int SOUTH
To view the source code for javax.swing SwingConstants SOUTH.
Click Source Link
From source file:op.controlling.PnlControlling.java
private CollapsiblePane createCP4Nutrition() { final CollapsiblePane cpOrga = new CollapsiblePane(); String title = "<html><font size=+1>" + SYSTools.xx("opde.controlling.nutrition") + "</font></html>"; DefaultCPTitle cptitle = new DefaultCPTitle(title, new ActionListener() { @Override/* w w w. j av a 2s. c o m*/ public void actionPerformed(ActionEvent e) { try { cpOrga.setCollapsed(!cpOrga.isCollapsed()); } catch (PropertyVetoException pve) { // BAH! } } }); cpOrga.setTitleLabelComponent(cptitle.getMain()); cpOrga.setSlidingDirection(SwingConstants.SOUTH); cpOrga.addCollapsiblePaneListener(new CollapsiblePaneAdapter() { @Override public void paneExpanded(CollapsiblePaneEvent collapsiblePaneEvent) { cpOrga.setContentPane(createContentPanel4Nutrition()); } }); if (!cpOrga.isCollapsed()) { cpOrga.setContentPane(createContentPanel4Nutrition()); } cpOrga.setHorizontalAlignment(SwingConstants.LEADING); // cpOrga.setOpaque(false); // cpOrga.setBackground(getColor(vtype, SYSConst.medium1)); return cpOrga; }
From source file:op.controlling.PnlControlling.java
private CollapsiblePane createCP4Drugs() { final CollapsiblePane cpDrugs = new CollapsiblePane(); String title = "<html><font size=+1>" + SYSTools.xx("opde.controlling.drugs") + "</font></html>"; DefaultCPTitle cptitle = new DefaultCPTitle(title, new ActionListener() { @Override//from ww w . j ava 2s .co m public void actionPerformed(ActionEvent e) { try { cpDrugs.setCollapsed(!cpDrugs.isCollapsed()); } catch (PropertyVetoException pve) { // BAH! } } }); cpDrugs.setTitleLabelComponent(cptitle.getMain()); cpDrugs.setSlidingDirection(SwingConstants.SOUTH); cpDrugs.addCollapsiblePaneListener(new CollapsiblePaneAdapter() { @Override public void paneExpanded(CollapsiblePaneEvent collapsiblePaneEvent) { cpDrugs.setContentPane(createContentPanel4Drugs()); } }); if (!cpDrugs.isCollapsed()) { cpDrugs.setContentPane(createContentPanel4Drugs()); } cpDrugs.setHorizontalAlignment(SwingConstants.LEADING); return cpDrugs; }
From source file:op.controlling.PnlControlling.java
private CollapsiblePane createCP4Nursing() { final CollapsiblePane cpOrga = new CollapsiblePane(); String title = "<html><font size=+1>" + SYSTools.xx("opde.controlling.nursing") + "</font></html>"; DefaultCPTitle cptitle = new DefaultCPTitle(title, new ActionListener() { @Override//from www. java 2s . com public void actionPerformed(ActionEvent e) { try { cpOrga.setCollapsed(!cpOrga.isCollapsed()); } catch (PropertyVetoException pve) { // BAH! } } }); cpOrga.setTitleLabelComponent(cptitle.getMain()); cpOrga.setSlidingDirection(SwingConstants.SOUTH); cpOrga.addCollapsiblePaneListener(new CollapsiblePaneAdapter() { @Override public void paneExpanded(CollapsiblePaneEvent collapsiblePaneEvent) { cpOrga.setContentPane(createContentPanel4Nursing()); } }); if (!cpOrga.isCollapsed()) { cpOrga.setContentPane(createContentPanel4Nursing()); } cpOrga.setHorizontalAlignment(SwingConstants.LEADING); return cpOrga; }
From source file:op.users.PnlUser.java
private CollapsiblePane createCP4(final Users user) { final String key = user.getUID() + ".xusers"; if (!cpMap.containsKey(key)) { cpMap.put(key, new CollapsiblePane()); try {/* www .ja v a2s . c o m*/ cpMap.get(key).setCollapsed(true); } catch (PropertyVetoException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } final CollapsiblePane cp = cpMap.get(key); DefaultCPTitle cptitle = new DefaultCPTitle("<html><font size=+1>" + user.toString() + (UsersTools.isQualified(user) ? ", " + SYSTools.xx("opde.users.qualifiedNurse") : "") + "</font></html>", new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { cp.setCollapsed(!cp.isCollapsed()); } catch (PropertyVetoException pve) { // BAH! } } }); /*** * ____ _ ______ __ * / ___| |__ __ _ _ __ __ _ ___| _ \ \ / / * | | | '_ \ / _` | '_ \ / _` |/ _ \ |_) \ \ /\ / / * | |___| | | | (_| | | | | (_| | __/ __/ \ V V / * \____|_| |_|\__,_|_| |_|\__, |\___|_| \_/\_/ * |___/ */ final JButton btnChangePW = new JButton(SYSConst.icon22password); btnChangePW.setPressedIcon(SYSConst.icon22passwordPressed); btnChangePW.setAlignmentX(Component.RIGHT_ALIGNMENT); btnChangePW.setContentAreaFilled(false); btnChangePW.setBorder(null); btnChangePW.setToolTipText(SYSTools.xx("opde.users.btnChangePW.tooltip")); btnChangePW.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { EntityManager em = OPDE.createEM(); try { em.getTransaction().begin(); Users myUser = em.merge(usermap.get(user.getUID())); String newpw = SYSTools.generatePassword(myUser.getVorname(), myUser.getName()); em.lock(myUser, LockModeType.OPTIMISTIC); myUser.setMd5pw(SYSTools.hashword(newpw)); em.getTransaction().commit(); lstUsers.remove(user); lstUsers.add(myUser); usermap.put(key, myUser); Collections.sort(lstUsers); SYSTools.printpw(newpw, myUser); OPDE.getDisplayManager().addSubMessage(new DisplayMessage(SYSTools.xx("opde.users.pwchanged"))); } catch (OptimisticLockException ole) { OPDE.warn(ole); if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage()); } catch (Exception e) { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } OPDE.fatal(e); } finally { em.close(); } } }); btnChangePW.setEnabled(user.isActive()); cptitle.getRight().add(btnChangePW); /*** * _ _ _ _ _ ___ _ _ * | |__ | |_ _ __ / \ ___| |_(_)_ _____|_ _|_ __ __ _ ___| |_(_)_ _____ * | '_ \| __| '_ \ / _ \ / __| __| \ \ / / _ \| || '_ \ / _` |/ __| __| \ \ / / _ \ * | |_) | |_| | | |/ ___ \ (__| |_| |\ V / __/| || | | | (_| | (__| |_| |\ V / __/ * |_.__/ \__|_| |_/_/ \_\___|\__|_| \_/ \___|___|_| |_|\__,_|\___|\__|_| \_/ \___| * */ final JButton btnActiveInactive = new JButton( user.isActive() ? SYSConst.icon22stop : SYSConst.icon22playerPlay); btnActiveInactive .setPressedIcon(user.isActive() ? SYSConst.icon22stopPressed : SYSConst.icon22playerPlayPressed); btnActiveInactive.setAlignmentX(Component.RIGHT_ALIGNMENT); btnActiveInactive.setContentAreaFilled(false); btnActiveInactive.setBorder(null); btnActiveInactive.setToolTipText(SYSTools .xx(internalClassID + (user.isActive() ? ".btnActiveInactive.stop" : ".btnActiveInactive.play"))); btnActiveInactive.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { EntityManager em = OPDE.createEM(); try { em.getTransaction().begin(); Users myUser = em.merge(usermap.get(user.getUID())); em.lock(myUser, LockModeType.OPTIMISTIC); myUser.setStatus(myUser.isActive() ? UsersTools.STATUS_INACTIVE : UsersTools.STATUS_ACTIVE); em.getTransaction().commit(); lstUsers.remove(user); lstUsers.add(myUser); usermap.put(myUser.getUID(), myUser); Collections.sort(lstUsers); CollapsiblePane cp = createCP4(myUser); boolean wasCollapsed = cpMap.get(key).isCollapsed(); cpMap.put(key, cp); cp.setCollapsed(myUser.isActive() ? wasCollapsed : true); buildPanel(); } catch (OptimisticLockException ole) { OPDE.warn(ole); if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } if (ole.getMessage().indexOf("Class> entity.info.Resident") > -1) { OPDE.getMainframe().emptyFrame(); OPDE.getMainframe().afterLogin(); } OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage()); } catch (Exception e) { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } OPDE.fatal(e); } finally { em.close(); } } }); cptitle.getRight().add(btnActiveInactive); /*** * _ _ _ * ___ __| (_) |_ * / _ \/ _` | | __| * | __/ (_| | | |_ * \___|\__,_|_|\__| * */ final JButton btnEdit = new JButton(SYSConst.icon22edit3); btnEdit.setPressedIcon(SYSConst.icon22edit3Pressed); btnEdit.setAlignmentX(Component.RIGHT_ALIGNMENT); btnEdit.setContentAreaFilled(false); btnEdit.setBorder(null); btnEdit.setToolTipText(SYSTools.xx("opde.users.btnEdit")); btnEdit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { new DlgUser(user, new Closure() { @Override public void execute(Object o) { if (o != null) { EntityManager em = OPDE.createEM(); try { em.getTransaction().begin(); Users myUser = em.merge((Users) o); em.lock(myUser, LockModeType.OPTIMISTIC); em.getTransaction().commit(); lstUsers.remove(user); lstUsers.add(myUser); usermap.put(myUser.getUID(), myUser); Collections.sort(lstUsers); CollapsiblePane cp = createCP4(myUser); boolean wasCollapsed = cpMap.get(key).isCollapsed(); cpMap.put(key, cp); cp.setCollapsed(myUser.isActive() ? wasCollapsed : true); buildPanel(); } catch (OptimisticLockException ole) { OPDE.warn(ole); if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } if (ole.getMessage().indexOf("Class> entity.info.Resident") > -1) { OPDE.getMainframe().emptyFrame(); OPDE.getMainframe().afterLogin(); } OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage()); } catch (Exception e) { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } OPDE.fatal(e); } finally { em.close(); } } } }); } }); cptitle.getRight().add(btnEdit); cp.setTitleLabelComponent(cptitle.getMain()); cp.setSlidingDirection(SwingConstants.SOUTH); /*** * ___ ___ _ _ _____ ___ _ _ _____ * / __/ _ \| \| |_ _| __| \| |_ _| * | (_| (_) | .` | | | | _|| .` | | | * \___\___/|_|\_| |_| |___|_|\_| |_| * */ cp.addCollapsiblePaneListener(new CollapsiblePaneAdapter() { @Override public void paneExpanded(CollapsiblePaneEvent collapsiblePaneEvent) { if (!contentMap.containsKey(key)) { contentMap.put(key, new PnlEditMemberships(user, lstGroups)); } cp.setContentPane(contentMap.get(key)); cp.setOpaque(false); } } ); cp.setBackground(UsersTools.getBG1(user)); cp.setCollapsible(user.isActive()); cp.setHorizontalAlignment(SwingConstants.LEADING); cp.setOpaque(false); return cp; }
From source file:op.users.PnlUser.java
private CollapsiblePane createCP4(final Groups group) { final String key = group.getGID() + ".xgroups"; if (!cpMap.containsKey(key)) { cpMap.put(key, new CollapsiblePane()); cpMap.get(key).setSlidingDirection(SwingConstants.SOUTH); cpMap.get(key).setBackground(bg); cpMap.get(key).setForeground(fg); cpMap.get(key).addCollapsiblePaneListener(new CollapsiblePaneAdapter() { @Override//from w w w . jav a2 s. co m public void paneExpanded(CollapsiblePaneEvent collapsiblePaneEvent) { if (!contentMap.containsKey(key)) { contentMap.put(key, createContentPanel4(group)); } cpMap.get(key).setContentPane(contentMap.get(key)); } }); cpMap.get(key).setHorizontalAlignment(SwingConstants.LEADING); cpMap.get(key).setOpaque(false); try { cpMap.get(key).setCollapsed(true); } catch (PropertyVetoException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } final CollapsiblePane cp = cpMap.get(key); DefaultCPTitle cpTitle = new DefaultCPTitle("<html><font size=+1>" + group.getGID().toUpperCase() + (group.isQualified() ? ", " + SYSTools.xx("opde.users.qualifiedGroup") : "") + "</font></html>", new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { cp.setCollapsed(!cp.isCollapsed()); } catch (PropertyVetoException pve) { // BAH! } } }); /*** * _ _ _ * __| | ___| | ___| |_ ___ __ _ _ __ ___ _ _ _ __ * / _` |/ _ \ |/ _ \ __/ _ \ / _` | '__/ _ \| | | | '_ \ * | (_| | __/ | __/ || __/ | (_| | | | (_) | |_| | |_) | * \__,_|\___|_|\___|\__\___| \__, |_| \___/ \__,_| .__/ * |___/ |_| */ final JButton btnDeleteGroup = new JButton(SYSConst.icon22delete); btnDeleteGroup.setPressedIcon(SYSConst.icon22deletePressed); btnDeleteGroup.setAlignmentX(Component.RIGHT_ALIGNMENT); btnDeleteGroup.setContentAreaFilled(false); btnDeleteGroup.setBorder(null); btnDeleteGroup.setToolTipText(SYSTools.xx("opde.users.btnDeleteGroup")); btnDeleteGroup.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { new DlgYesNo(SYSTools.xx("misc.questions.delete1") + "<br/><i>" + group.getGID() + "</i><br/>" + SYSTools.xx("misc.questions.delete2"), SYSConst.icon48delete, new Closure() { @Override public void execute(Object o) { if (o.equals(JOptionPane.YES_OPTION)) { EntityManager em = OPDE.createEM(); try { em.getTransaction().begin(); Groups myGroup = em.merge(group); em.remove(myGroup); em.getTransaction().commit(); lstGroups.remove(group); cpMap.remove(key); buildPanel(); } catch (OptimisticLockException ole) { OPDE.warn(ole); if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } if (ole.getMessage().indexOf("Class> entity.info.Resident") > -1) { OPDE.getMainframe().emptyFrame(); OPDE.getMainframe().afterLogin(); } OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage()); } catch (Exception e) { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } OPDE.fatal(e); } finally { em.close(); } } } }); } }); btnDeleteGroup.setEnabled(!group.isSystem()); cpTitle.getRight().add(btnDeleteGroup); cp.setTitleLabelComponent(cpTitle.getMain()); if (!cp.isCollapsed()) { if (!contentMap.containsKey(key)) { contentMap.put(key, createContentPanel4(group)); } cp.setContentPane(contentMap.get(key)); } return cp; }
From source file:org.drugis.addis.gui.components.progressgraph.ProgressGraph.java
public JPanel createPanel() { final FormLayout layout = new FormLayout(createFormSpec("pref", d_numCols), "p, " + createFormSpec("3dlu, p", d_numTotalRows - 1)); CellConstraints cc = new CellConstraints(); JPanel progressPanel = new JPanel(layout); Dimension cellSize = new Dimension(d_edgeLength, d_arrowSize); Dimension circleSize = new Dimension(d_circleDiameter, d_circleDiameter); for (int i = 0; i < d_numberOfChains; ++i) { int rowIdx = (2 * i) + 1; Task tuningTask = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.TUNING_CHAIN_PREFIX + i); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), cc.xy(6, rowIdx)); progressPanel.add(new GraphProgressNode(d_gridCellSize, tuningTask), cc.xy(7, rowIdx)); Task simulationTask = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.SIMULATION_CHAIN_PREFIX + i); progressPanel.add(new GraphLine(new Dimension(d_edgeLength * 2, d_arrowSize), 2, SwingConstants.EAST), cc.xy(9, rowIdx));//from w ww . ja va2 s.c om progressPanel.add(new GraphProgressNode(d_gridCellSize, simulationTask), cc.xy(10, rowIdx)); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), cc.xy(11, rowIdx)); } /** Placement needed for the calculated preferred size */ progressPanel.add(new GraphSimpleNode(circleSize, GraphSimpleNodeType.START), centerCell(cc, d_numMainRows, 1)); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), centerCell(cc, d_numMainRows, 2)); Task startTask = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.STARTING_SIMULATION_PHASE); progressPanel.add(new GraphProgressNode(d_gridCellSize, startTask, false), centerCell(cc, d_numMainRows, 3)); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), centerCell(cc, d_numMainRows, 4)); //NOTE: it is a mystery why numMainRows - 1 is the correct count instead of just numMainRows progressPanel.add( new GraphBar(new Dimension(d_barWidth, (int) progressPanel.getPreferredSize().getHeight())), centerCell(cc, d_numMainRows - 1, 5)); progressPanel.add( new GraphBar(new Dimension(d_barWidth, (int) progressPanel.getPreferredSize().getHeight())), centerCell(cc, d_numMainRows - 1, 12)); Task assessConvergence = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.CALCULATING_SUMMARIES_PHASE); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), centerCell(cc, d_numMainRows, 13)); progressPanel.add(new GraphProgressNode(d_gridCellSize, assessConvergence, false), centerCell(cc, d_numMainRows, 14)); progressPanel.add(new GraphLine(new Dimension(d_arrowSize, 50), 2, SwingConstants.SOUTH), cc.xywh(14, d_numMainRows / 2 + 2, 1, d_numMainRows / 2 + 1, CellConstraints.CENTER, CellConstraints.BOTTOM)); progressPanel.add(new GraphSimpleNode(circleSize, GraphSimpleNodeType.DECISION), cc.xywh(14, d_numMainRows + 2, 1, 1, CellConstraints.CENTER, CellConstraints.CENTER)); progressPanel.add( new GraphLine(new Dimension((int) (d_edgeLength + (d_edgeLength)), d_arrowSize), 2, SwingConstants.EAST), cc.xyw(14, d_numMainRows + 2, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT)); progressPanel.add(new GraphSimpleNode(circleSize, GraphSimpleNodeType.END), cc.xy(16, d_numMainRows + 2)); progressPanel.add(new GraphLine(new Dimension(d_edgeLength * 9, d_arrowSize), 2, SwingConstants.WEST), cc.xyw(10, d_numMainRows + 2, 14 - 7, CellConstraints.LEFT, CellConstraints.DEFAULT)); progressPanel.add(new GraphBar(new Dimension(d_edgeLength * 2, d_barWidth)), cc.xy(9, d_numMainRows + 2)); int totalHeight = (int) progressPanel.getPreferredSize().getHeight(); progressPanel.add( new GraphConnector(new Dimension(d_edgeLength * 2, totalHeight), d_cellHeight + Sizes.DLUY3.getPixelSize(progressPanel), totalHeight - 30, d_numberOfChains), cc.xywh(9, 1, 1, d_numTotalRows)); PanelBuilder builder = new PanelBuilder(new FormLayout("pref", "p")); builder.setDefaultDialogBorder(); builder.add(progressPanel); return builder.getPanel(); }
From source file:org.executequery.base.DockedTabContainer.java
/** * Closed the specfied tab component with name at the specified position. * //from w ww. j a v a2s .com * @param the name of the tab component * @param the position */ public void closeTabComponent(String name, int position) { TabPane tabPane = getTabPaneForPosition(position); if (position == SwingConstants.SOUTH || position == SwingConstants.SOUTH_WEST || position == SwingConstants.SOUTH_EAST) { if (tabPane != null) { ((AbstractTabPane) tabPane).closeTabComponent(name); } else { closeTabComponent(name, NORTH); } } if (tabPane != null) { ((AbstractTabPane) tabPane).closeTabComponent(name); } }
From source file:org.executequery.base.DockedTabContainer.java
/** * Returns the tab pane at the specified position. * * @param position - the position of the pane *//*from w w w . j a v a 2 s .co m*/ protected TabPane getTabPaneForPosition(int position) { switch (position) { case SwingConstants.NORTH: case SwingConstants.NORTH_WEST: case SwingConstants.NORTH_EAST: return northTabPane; case SwingConstants.SOUTH: case SwingConstants.SOUTH_WEST: case SwingConstants.SOUTH_EAST: return southTabPane; case SwingConstants.CENTER: return scrollingTabPane; } return null; }
From source file:org.executequery.base.DockedTabContainer.java
protected int getTabPanePosition(DockedTabPane tabPane) { if (tabPane == northTabPane) { if (orientation == SwingConstants.WEST) { return SwingConstants.NORTH_WEST; } else {/*from w ww . jav a 2 s .co m*/ return SwingConstants.NORTH_EAST; } } else if (tabPane == southTabPane) { if (orientation == SwingConstants.WEST) { return SwingConstants.SOUTH_WEST; } else if (orientation == SwingConstants.CENTER) { return SwingConstants.SOUTH; } else { return SwingConstants.SOUTH_EAST; } } return SwingConstants.NORTH_WEST; // default }
From source file:org.executequery.base.DockedTabContainer.java
/** * Adds the specified component as a docked tab component * in the specified position./*from w w w. j a v a 2s. c o m*/ * * @param the tab title * @param the tab icon * @param the component * @param the tab's tool tip * @param the position - one of SwingConstants.NORTH | SOUTH */ public void addDockedTab(String title, Icon icon, Component component, String tip, int position) { // make sure the split pane is visible splitPane.setVisible(true); DockedTabPane tabPane = null; // check if we have a north tab pane. // if not, add there regardless of specified position if (northTabPane == null && orientation != CENTER) { northTabPane = new DockedTabPane(this); splitPane.setLeftComponent(northTabPane); tabPane = northTabPane; // if we have minimised tabs but added a tab pane // restore it to its previous size //if (buttonPanel != null) { //desktopMediator.resetPaneToPreferredSizes(orientation, true); //} } else { switch (position) { case SwingConstants.NORTH: case SwingConstants.NORTH_WEST: case SwingConstants.NORTH_EAST: tabPane = northTabPane; break; case SwingConstants.SOUTH: case SwingConstants.SOUTH_WEST: case SwingConstants.SOUTH_EAST: if (southTabPane == null) { southTabPane = new DockedTabPane(this); southPaneCreated(); } tabPane = southTabPane; break; case SwingConstants.CENTER: if (scrollingTabPane == null) { scrollingTabPane = new ScrollingTabPane(this); splitPane.setLeftComponent(scrollingTabPane); splitPane.setGlassPaneVisible(SwingUtilities.BOTTOM, true); splitPane.setGlassPaneVisible(SwingUtilities.TOP, false); splitPane.setResizeWeight(1.0); if (southTabPane != null) { splitPane.setDividerSize(ApplicationConstants.SPLIT_PANE_DIVIDER_SIZE); } } scrollingTabPane.addTab(position, title, icon, component, tip); return; } } if (tabPane != null) { tabPane.addTab(position, title, icon, component, tip); } if (orientation != SwingConstants.CENTER) { desktopMediator.resetPaneToPreferredSizes(orientation, true); } }