public JComponent getComponent() { ltValeur_=new BuList(); //tfValeur_.setColumns(20); //ltValeur_.addListSelectionListener(this); lbValeur_ =new BuLabelMultiLine(); lbCommentaire_=new BuLabelMultiLine(); BuPanel p=new BuPanel(); p.setLayout(new BuVerticalLayout()); p.setBorder(EMPTY5555); p.add(lbValeur_); p.add(ltValeur_); p.add(lbCommentaire_); p.add(new BuPanel()); return p; }
/** * @param _r * @param _titre */ private void affiche(final String[] _r, final String _titre) { setTitle(_titre); pnMain_.removeAll(); // pnMain_.setBackground(Color.white); // pnMain_.setOpaque(true); final BuGridLayout glayout= new BuGridLayout(1, 5, 5, false, false, false, false); glayout.setXAlign(LEFT_ALIGNMENT); pnMain_.setLayout(glayout); if (_r == null) { pnMain_.add(new BuLabel("Liste vide")); } else { for (int i= 0; i < _r.length; i++) { pnMain_.add(new BuLabel(_r[i])); } } pack(); pnMain_.repaint(); } /**
public static BuPanel getInfosPanel(final BuInformationsSoftware _isoft) { final BuPanel mpi = new BuPanel(); mpi.setLayout(new BuVerticalLayout(5)); mpi.setBorder(new EmptyBorder(5, 5, 5, 5)); mpi.setBackground(mpi.getBackground().darker()); mpi.setForeground(Color.white); BuPicture mllogo = null; if (_isoft.logo != null) { mllogo = new BuPicture(_isoft.logo); } final BuLabelMultiLine mlisoft = new BuLabelMultiLine(_isoft.name + "\nversion: " + _isoft.version + "\ndate: " + _isoft.date); mlisoft.setFont(BuLib.deriveFont("Label", Font.PLAIN, -2)); mlisoft.setForeground(Color.white); if (mllogo != null) { mpi.add(mllogo); } mpi.add(mlisoft); return mpi; }
/** * Affecte la palette un panneau de parametres de l'outil courant. * @param _c le composant associe a l'outil courant. Peut tre null si l'outil ne possde pas de paramtres, ou en cas * de dsactivation d'un outil. */ public void setEditorPanel(final JComponent _c) { editorPanel_.removeAll(); if (_c == null) { editorPanel_.setVisible(false); } else { editorPanel_.add(_c, BuBorderLayout.CENTER); editorPanel_.setVisible(true); } revalidate(); }
options_ =BuPreferences.BU; BuPanel q=new BuPanel(); q.setLayout(new BuGridLayout(2,5,2)); q.setBorder(new EmptyBorder(0,5,0,5)); cbEtats_[i].setText(getS(CODES[i][2])); cbEtats_[i].addActionListener(this); q.add(cbEtats_[i]); BuLabel lb=new BuLabel(); String tt=getS(CODES[i][3]); q.add(lb); BuPanel p=new BuPanel(); p.setBorder (new CompoundBorder (new BuTitledBorder(getTitle()), EMPTY5555)); p.setLayout(new BuBorderLayout()); p.add(new BuScrollPane(q),BuBorderLayout.CENTER); p.setPreferredSize(new Dimension(p.getPreferredSize().width,200));
left_ = new BuPanel(); left_.setLayout(leftlo); left_.setBorder(EMPTY5555); Color bg = BuLib.getColor(left_.getBackground().darker()); left_.setBackground(bg); if (ml_logo != null) left_.add(ml_logo); BuPanel mpl = new BuPanel(); mpl.setLayout(lol); mpl.setBorder(EMPTY0505); BuPanel px = new BuPanel(); px.setOpaque(false); mpl.add(px); mpl.add(l1); mpl.add(l2); mpl.add(l3); mpl.add(l4); mpl.add(progression_); mpl.add(load_); px.setPreferredSize(new Dimension(0, Math.max(0, 384 - mpl.getPreferredSize().height))); mpl.setOpaque(false);
pnPage_.removeAll(); else if((l>=2)&&(l<=4)) n=2; else n=1; pnPage_.setLayout(new GridLayout(0,n,5,5)); picture.computePreferredSize(); picture.setMode(BuPicture.REDUCE); BuPanel q=new BuPanel(new BuOverlayLayout(false,false,true)); q.add(picture); pnPage_.add(q,BuBorderLayout.CENTER);//); pnPage_.revalidate(); pnPage_.repaint();
tfExemple_.putClientProperty("SLAF_NO_TEXTURE",Boolean.TRUE); tfExemple_.setOpaque(true); tfExemple_.setBackground(UIManager.getColor("TextArea.background")); tfExemple_.setForeground(UIManager.getColor("TextArea.foreground")); tfExemple_.setPreferredSize(new Dimension(400,72)); BuPanel pnExemple=new BuPanel(new BuBorderLayout()); pnExemple.setBorder(new CompoundBorder (new BuTitledBorder(getS("Prvisualisation")), BuLib.getEmptyBorder(5))); pnExemple.add(tfExemple_,BuBorderLayout.CENTER);
final BuPanel pnMain = new BuPanel(); pnMain.setLayout(new BuBorderLayout(2, 2)); final JLabel lb = new JLabel(CtuluLib.getS("Favoris") + ':'); pnMain.add(lb, BuBorderLayout.WEST); final FavoriteModel model = new FavoriteModel(); final JComboBox j = new JComboBox(model); pnMain.add(j, BuBorderLayout.CENTER); BuToolButton bt = new BuToolButton(BuResource.BU.loadMenuCommandIcon("oui")); bt.setToolTipText(CtuluLib.getS("Ajouter le rpertoire courant aux favoris")); final BuPanel pnBt = new BuPanel(); pnBt.setLayout(new BuButtonLayout(1, SwingConstants.CENTER)); pnBt.add(bt); bt = new BuToolButton(BuResource.BU.loadMenuCommandIcon("editer")); bt.addActionListener(new ActionListener() { pnBt.add(bt); pnMain.add(pnBt, BuBorderLayout.EAST); pnMain.revalidate(); final Dimension d = pnMain.getPreferredSize(); _d.doLayout(); d.width = _d.getPreferredSize().width; pnMain.setPreferredSize(d); return pnMain;
public BuWizardDialog(Frame _parent,BuWizardTask _task) { super(_parent); task_=_task; if(task_==null) task_=new BuWizardTaskSample(); addWindowListener(this); setTitle(task_.getTaskTitle()); content_ = (JComponent) getContentPane(); content_.setLayout(new BorderLayout(5,5)); header_ = new BuHeaderPanel(); view_ = new BuPanel(); view_.setLayout(new BorderLayout()); view_.setBorder(new EmptyBorder(20,30,20,30)); buttons_=new BuButtonPanel(BuButtonPanel.TERMINER,this); content_.add(header_ ,BorderLayout.NORTH); content_.add(view_ ,BorderLayout.CENTER); content_.add(buttons_,BorderLayout.SOUTH); installStep(); }
public BPaletteEdition() { super(); setLayout(new BuVerticalLayout(0, true, false)); buildGlobalsActions(this); editorPanel_ = new BuPanel(); editorPanel_.setLayout(new BuBorderLayout()); editorPanel_.setBorder(BorderFactory.createEtchedBorder()); editorPanel_.setVisible(false); add(editorPanel_); }
public BSelecteurColorChooserBt(final boolean _invisible, final String _prop) { super(_prop); useInvisible_ = _invisible; bt_ = new TraceIconButton(); bt_.setMaximumSize(new Dimension(20, 20)); bt_.addActionListener(this); pn_ = new BuPanel(new BuHorizontalLayout(0, false, true)); pn_.add(bt_); pn_.add(new PopupButton()); setTitle(EbliLib.getS("Couleur")); }
final BuPanel pnBt = new BuPanel(); pnBt.setName("pnBt"); pnBt.setLayout(new BuVerticalLayout(5, true, false)); boolean sep = false; if (btAjouter_ != null) { pnBt.add(btInserer_); pnBt.add(btSupprimer_); pnBt.add(btMonter_); pnBt.add(btDescendre_); pnBt.add(new BuSeparator()); pnBt.add(btModifier_);
BuPanel p=new BuPanel(new BorderLayout(0,0)); p.setBackground(BuLib.getColor(Color.white)); p.setBorder(EMPTY0505); add(p,BorderLayout.CENTER); title_.setWrapMode(BuLabelMultiLine.WORD); title_.setBorder(new EmptyBorder(5,5,5,0)); p.add(title_,BorderLayout.CENTER); //NORTH); text_.setWrapMode(BuLabelMultiLine.WORD); text_.setBorder(new EmptyBorder(0,25,0,0)); p.add(text_,BorderLayout.SOUTH); //CENTER);
r.setOpaque(false); r.setLayout(new BuBorderLayout(-1,-1)); if(ac!=null) ac.setBorder(ACTIONS_BORDER); r.add(lb,BuBorderLayout.NORTH); r.add(vw,BuBorderLayout.CENTER); if(ac!=null) r.add(ac,BuBorderLayout.EAST); r.setPreferredSize(D200X200); r.setSize (D200X200); r.revalidate();