protected void buildComponents(final FudaaHelpParentI _parent) { setLayout(new BuBorderLayout()); try { buildTree(); } catch (final Exception _e) { FuLog.warning(_e); } pane_ = new FudaaHelpPane(_parent, isHttpBase()); pane_.setPreferredSize(new Dimension(350, 450)); final BuScrollPane scroll = new BuScrollPane(pane_); if (trIndex_ == null) { add(scroll, BuBorderLayout.CENTER); } else { add(new BuSplit2Pane(new BuScrollPane(trIndex_), scroll), BuBorderLayout.CENTER); } if (trIndex_ != null && trIndex_.getModel().getChildCount(trIndex_.getModel().getRoot()) > 0) { goHome(); } }
public JComponent getComponent() { if (pn_ == null) { pn_ = new BuPanel(new BuBorderLayout(0, 5)); pn_.setBorder(BuBorders.EMPTY3333); final JTree tree = model_.createView(false, true); selection_ = tree.getSelectionModel(); final BuScrollPane sc = new BuScrollPane(tree); sc.setPreferredHeight(80); sc.setPreferredWidth(60); pn_.add(sc, BuBorderLayout.CENTER); final BuPanel pnCb = new BuPanel(new BuVerticalLayout(1)); pnCb.add(new BuLabel(EbliLib.getS("Une ligne est slectionne si:"))); pnCb.add(cb_); pn_.add(pnCb, BuBorderLayout.SOUTH); } return pn_; }
if((scrollpane_!=null)&&(scrollpane_.getParent()==content_)) content_.remove(scrollpane_); Object message=_message; scrollpane_=new BuScrollPane(lbMessage_); int h=lbMessage_.getFont().getSize(); scrollpane_.getHorizontalScrollBar().setUnitIncrement (150); scrollpane_.getVerticalScrollBar() .setUnitIncrement (h+1); !=BuLabelMultiLine.NONE)) scrollpane_.setHorizontalScrollBarPolicy (ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollpane_.setVerticalScrollBarPolicy (ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollpane_.setPreferredSize(scrollpane_.getPreferredSize()); scrollpane_.setVerticalScrollBarPolicy (ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
sp_ =new BuScrollPane(display_); (display_.c_to_x(Math.min(80,_nbc)),//+(_nbl>24 ? 21 : 0), display_.l_to_y(Math.min(24,_nbl)));//+(_nbc>80 ? 21 : 0)); JViewport vp=sp_.getViewport(); Insets insets=vp.getInsets(); sd.width +=insets.left+insets.right; sd.height+=insets.top+insets.bottom; vp.setPreferredSize(sd); sp_.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); sp_.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); sp_.setPreferredSize(sp_.getPreferredSize()); vp.setPreferredSize(null); sp_.setHorizontalScrollBarPolicy (ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
BuScrollPane sp1=new BuScrollPane(ltPages_); sp1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); sp1.setVerticalScrollBarPolicy (ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS ); Dimension ps1=sp1.getPreferredSize(); sp1.setPreferredSize(new Dimension(ps1.width,200)); sp1.setVisible(_images.length>1); content.add(sp1,BuBorderLayout.EAST);
BuPanel var = new BuPanel(lay); var.add(new BuLabel(CtuluLib.getS("Fonctions"))); BuScrollPane scroll = new BuScrollPane(listFct); var.add(scroll); top.add(var); var.add(new BuLabel(CtuluLib.getS("Constantes"))); listCst.setVisibleRowCount(3); var.add(new BuScrollPane(listCst)); final VarRenderer render = new VarRenderer(); listCst.setCellRenderer(render); var.add(new BuLabel(CtuluLib.getS("Variables"))); listVar.setVisibleRowCount(3); var.add(new BuScrollPane(listVar)); listVar.setCellRenderer(render); top.add(var); var = new BuPanel(lay); var.add(new BuLabel(CtuluLib.getS("Variables utilises"))); final int prefH = scroll.getPreferredSize().height; table_.setTableHeader(null); scroll = new BuScrollPane(table_); scroll.setPreferredHeight(prefH); var.add(scroll); top.add(var); txt_.setColumns(30); txt_.setRows(3);
final JLabel error = dial_.getError(); if (error != null) { final BuScrollPane sc = new BuScrollPane(error); sc.setBorder(null); final FontMetrics fm = getFontMetrics(error.getFont()); sc.setPreferredHeight(fm.getHeight() * 2); _princ.add(sc, BuBorderLayout.NORTH);
public JPanel buildPanel() { if (r_ != null) { return r_; } r_ = new BuPanel(); r_.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); r_.setLayout(new BuHorizontalLayout(5, true, true)); final BuPanel top = new BuPanel(); table_ = new ColorTable(); final BuPanel pnTop = new BuPanel(); pnTop.setLayout(new BuBorderLayout(5, 5, true, true)); tftTitle_ = new BuTextField(); tftTitle_.setColumns(10); tftTitle_.setText(title_); pnTop.add(tftTitle_, BuBorderLayout.NORTH); final BuScrollPane p = new BuScrollPane(table_); p.setPreferredWidth(table_.getPreferredSize().width); p.setColumnHeaderView(null); pnTop.add(p, BuBorderLayout.CENTER); pnTop.setBorder(BorderFactory.createEtchedBorder()); top.add(pnTop); ch_ = new JColorChooser(); ch_.getSelectionModel().addChangeListener(this); r_.add(top); r_.add(ch_); table_.setColumnSelectionInterval(0, 0); table_.setRowSelectionInterval(0, 0); valueChanged(null); return r_; }
/** * @param _s le coeur */ public FudaaDodicoSelectionFirstPanel(final FudaaDodicoSelectionServeur _s) { srv_ = _s; distant_ = new boolean[srv_.getNbServeur()]; setLayout(new BuVerticalLayout(5)); allLocal_ = new BuCheckBox(FudaaLib.getS("Connexion(s) locale(s) uniquement")); allLocal_.addActionListener(this); add(allLocal_); doNotAsk_ = new BuCheckBox(FudaaLib.getS("Toujours se connecter localement")); doNotAsk_.setBorder(BorderFactory.createEmptyBorder(0, 10, 15, 0)); doNotAsk_.setSelected(_s.getAllLocalPref()); add(doNotAsk_); doNotAsk_.setEnabled(false); add(doNotAsk_); t_ = new JTable(new ServeurTypeTableModel()); t_.getColumnModel().getColumn(0).setCellRenderer(new ServeurCellRenderer()); final TableColumn c2 = t_.getColumnModel().getColumn(1); c2.setCellEditor(new CtuluCellBooleanEditor()); c2.setCellRenderer(new BooleanCellRenderer()); final BuScrollPane sp = new BuScrollPane(t_); sp.setPreferredHeight(300); add(sp); }
setLayout(new BuBorderLayout(5, 5)); setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); final BuScrollPane scroll = new BuScrollPane(table_); int height = 0; if ((model_ != null) && (model_.getRowCount() > 0)) { height = 3 * table_.getRowHeight(); scroll.setPreferredHeight(height); scroll.setName("scroll"); add(scroll, BuBorderLayout.CENTER); boolean action = false;
final BuScrollPane spProxies = new BuScrollPane(proxies); spProxies.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); spProxies.setPreferredSize(new Dimension(200, 150));
desktop_ = (BuDesktop) middle; if (!desktop_.isTabbed() && _useScroll) { scrollDesktop_ = new BuScrollPane(desktop_); scrollDesktop_.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollDesktop_.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); middle = scrollDesktop_;
public BuFrameImage(BuCommonImplementation _app, String _file, Image _img) { super("",true,true,true,true); app_=_app; setName("ifIMAGEUR"); if(app_!=null) app_.installContextHelp(getRootPane(),"bu/p-imageur.html"); content_=(JComponent)getContentPane(); content_.setBorder(EMPTY0000); pane_=new BuPicture(); pane_.setOpaque(true); pane_.setBackground(Color.white); pane_.setBorder(EMPTY5555); pane_.setMode(BuPicture.LEFT); sp_=new BuScrollPane(pane_); sp_.setBorder(EMPTY0000); content_.add(sp_,BuBorderLayout.CENTER); if(_file!=null) setTitle(new File(_file).getName()); else setTitle(_("Image")); setFrameIcon(BuResource.BU.getFrameIcon("image")); setImage(_img); }
list_.addMouseListener(this); list_.setFocusable(false); sp_ = new BuScrollPane(list_); sp_.setPreferredWidth(70); add(sp_, BuBorderLayout.CENTER); final BuPanel east = new BuPanel();
sp= new BuScrollPane(taches_); sp.setPreferredSize(new Dimension(130, 80)); rc.addToggledComponent( BuResource.BU.getString("Tches"), sp= new BuScrollPane(ac_); sp.setPreferredSize(new Dimension(130, 370)); rc.addToggledComponent( BuResource.BU.getString("Calques"), sp= new BuScrollPane(fnInfo_); sp.setPreferredSize(new Dimension(130, 30)); rc.addToggledComponent( "Informations",
public void show() { spIcones_.setColumnHeaderView(null);//new BuLabel()); pack(); super.show(); }
public EbliAtomicsEditorPanel(final EbliAtomicCoordinatesTableModel _model, final CtuluCommandManager _cmd) { tableModel_ = _model; cmd_ = _cmd; table_ = new CtuluTable(); table_.setModel(tableModel_); tableModel_.updateCellEditor(table_); setLayout(new BuBorderLayout()); add(new BuScrollPane(table_)); }
BuScrollPane spDirs = new BuScrollPane(dirs_); spDirs.setPreferredSize(new Dimension(CELL_WIDTH + 15, 150)); p1.add(spDirs); BuScrollPane spFiles = new BuScrollPane(files_); spFiles.setPreferredSize(new Dimension(CELL_WIDTH + 15, 150)); p2.add(spFiles); final BuScrollPane sp3 = new BuScrollPane(viewer_); sp3.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); sp3.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); Dimension ps3 = sp3.getPreferredSize(); sp3.setPreferredSize(new Dimension(ps3.width + 200 * nbcols - 3, ps3.height + 400 + 2)); sp3.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); sp3.getVerticalScrollBar().setUnitIncrement(200 + GAP); sp3.getVerticalScrollBar().setBlockIncrement(400 + 2 * GAP); sp3.getHorizontalScrollBar().setUnitIncrement(200 + GAP); sp3.getHorizontalScrollBar().setBlockIncrement(400 + 2 * GAP);
private void showEditionDialog() { if (desktop_ != null) { if (editionDialog_ == null) { tableModel_ = createValueModel(); editionDialog_ = new BuPalette(); editionDialog_.setClosable(true); editionDialog_.setResizable(true); final BuTable tb = new BuTable(tableModel_); final BuScrollPane sp = new BuScrollPane(tb); sp.setPreferredWidth(120); sp.setPreferredHeight(60); editionDialog_.setContent(sp); editionDialog_.setVisible(true); editionDialog_.pack(); tb.getColumnModel().getColumn(0).setWidth(10); desktop_.addInternalFrame(editionDialog_); // on place la fenetre en dessus de ce panneau final Point desktopPt = desktop_.getLocationOnScreen(); final Point p = this.getLocationOnScreen(); editionDialog_.setLocation(p.x - desktopPt.x, p.y + getHeight() + 5 - desktopPt.y); } else { desktop_.addInternalFrame(editionDialog_); } } }
public BPaletteInfo() { setLayout(new BuBorderLayout()); txtTitle_ = new BuTextField(); final Font f = txtTitle_.getFont(); txtTitle_.setFont(new Font(f.getFamily(), Font.BOLD, f.getSize())); txtTitle_.setHorizontalAlignment(SwingConstants.CENTER); txtTitle_.setEditable(false); add(txtTitle_, BuBorderLayout.NORTH); setPreferredSize(new Dimension(300, 200)); tableModel_ = new PanelTableModel(); table_ = new JTable(tableModel_); table_.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); final JScrollPane sp = new BuScrollPane(table_); sp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); sp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); add(sp, BuBorderLayout.CENTER); final DefaultTableCellRenderer render = new DefaultTableCellRenderer() { public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, final boolean _hasFocus, final int _row, final int _column) { Component r = super.getTableCellRendererComponent(_table, _value, _isSelected, _hasFocus, _row, _column); setToolTipText(tableModel_.getLine(_row)); return r; } }; final TableColumnModel colModel = table_.getColumnModel(); colModel.getColumn(0).setCellRenderer(render); colModel.getColumn(1).setCellRenderer(render); }