public void setHorizontalTextPosition(int _htp) { if((delegate_==this)||(delegate_==null)) super.setHorizontalTextPosition(_htp); else delegate_.setHorizontalTextPosition(_htp); }
public Component getListCellRendererComponent (JList _list, Object _value, int _index, boolean _selected, boolean _focus) { Object pri=new PRI((Image)_value); BuLabel r=(BuLabel)super.getListCellRendererComponent (_list,pri,_index,_selected,_focus); r.setText(""+(_index+1)); r.setHorizontalTextPosition(SwingConstants.CENTER); r.setVerticalTextPosition(SwingConstants.BOTTOM); return r; } }
private BuPanel createPreviewPanel() { final BuPanel center = new BuPanel(new BuGridLayout(2, 2, 2)); center.setBorder(CtuluLibSwing.createTitleBorder(CtuluLib.getS("Exemples"))); for (int i = 0; i < values_.length; i++) { final BuLabel lb = new BuLabel(values_[i].toString()); center.add(lb); label_[i] = new BuLabel(); center.add(label_[i]); label_[i].setBackground(Color.WHITE); lb.setBackground(Color.WHITE); lb.setHorizontalTextPosition(SwingConstants.RIGHT); lb.setHorizontalAlignment(SwingConstants.RIGHT); lb.setOpaque(true); label_[i].setOpaque(true); label_[i].setHorizontalTextPosition(SwingConstants.CENTER); label_[i].setHorizontalAlignment(SwingConstants.RIGHT); } return center; }
public ZCalqueFlecheLegend(final ZCalqueFleche _support) { super(); support_ = _support; String[] props = FlecheScaleData.getScaleProperties(); for (int i = 0; i < props.length; i++) { support_.addPropertyChangeListener(props[i], this); } lbInfo_ = new BuLabel(); lbInfo_.setHorizontalAlignment(SwingConstants.CENTER); lbInfo_.setHorizontalTextPosition(SwingConstants.CENTER); fleche_ = new FlecheComponent(); initLegendPalette(); pnSize_ = new BuPanel(); pnSize_.setLayout(new BuVerticalLayout(2, true, false)); lbfleche_=new JLabel(fleche_); pnSize_.add(lbfleche_); pnSize_.add(lbInfo_); pnSize_.setOpaque(false); pnSize_.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.GRAY .brighter()), BuBorders.EMPTY5555)); support_.paletteLegende_.addUserComponent(pnSize_); if (support_.scale_.scaleFont_ != null) { lbInfo_.setFont(support_.scale_.scaleFont_); } init(); }
lbExample_ = new BuLabel(); lbExample_.setHorizontalAlignment(SwingConstants.CENTER); lbExample_.setHorizontalTextPosition(SwingConstants.CENTER); lbExample_.setBackground(Color.WHITE); lbExample_.setOpaque(true);