Revision 342 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/gui/dialogs/FFrameGridDialog.java

View differences:

FFrameGridDialog.java
56 56
import org.gvsig.fmap.geom.primitive.Envelope;
57 57
import org.gvsig.fmap.mapcontext.MapContext;
58 58
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
59
import org.gvsig.gui.awt.text.RotatedTextUtils;
59 60
import org.gvsig.gui.beans.AcceptCancelPanel;
60 61
import org.gvsig.gui.beans.numberTextField.NumberTextField;
62
import org.gvsig.gui.beans.simplecombobox.SimpleComboBox;
61 63
import org.gvsig.gui.beans.swing.JIncrementalNumberField;
62 64
import org.gvsig.gui.beans.swing.ValidatingTextField;
63 65
import org.gvsig.gui.beans.swing.ValidatingTextField.Cleaner;
......
105 107
	private static final Insets defaultInsets = new Insets(4, 4, 4, 4);
106 108
	private DecimalFormat format = new DecimalFormat();
107 109
	private JIncrementalNumberField nfRotationVert = null;
110
	private SimpleComboBox cbLblAnchor=null;
108 111

  
109 112
    public FFrameGridDialog(LayoutPanel layout, FFrameGrid fframe) {
110 113
        super(layout, fframe);
......
147 150
            c.gridy = row++;
148 151
            c.gridx = 0;
149 152
            c.gridwidth = 2;
153
            c.fill = GridBagConstraints.HORIZONTAL;
150 154
            pnlMain.add(getPnlLabelGroup(), c);
151 155

  
152 156
        }
......
474 478
            c.gridx = 1;
475 479
            pnlLabelGroup.add(getNfRotationVert(), c);
476 480
            
481
            c.gridy = row++;
477 482
            c.gridx = 0;
483
            c.fill = GridBagConstraints.NONE;
484
            pnlLabelGroup.add(new JLabel(Messages.getText("Anchor")), c);
485
            c.gridx = 1;
486
            c.fill = GridBagConstraints.HORIZONTAL;
487
            pnlLabelGroup.add(getCbLblAnchor(), c);
488
            
489
            c.gridx = 0;
478 490
            c.gridy = row++;
479 491
            c.gridwidth = 2;
480 492
            pnlLabelGroup.add(getPnlFont(), c);
......
482 494
        return pnlLabelGroup;
483 495
    }
484 496
    
497
    private SimpleComboBox getCbLblAnchor() {
498
    	if (cbLblAnchor==null) {
499
        	cbLblAnchor = new SimpleComboBox();
500
        	cbLblAnchor.addItem(Messages.getText("Corner"), RotatedTextUtils.ANCHOR_CORNER);
501
        	cbLblAnchor.addItem(Messages.getText("Center"), RotatedTextUtils.ANCHOR_CENTER);
502
        	cbLblAnchor.setSelectedCode(fframegrid.getLabelAnchor());
503
    	}
504
    	return cbLblAnchor;
505
    }
506
    
485 507
    private JButton getBtnNumberFormat() {
486 508
    	if (btnNumberFormat==null) {
487 509
    		btnNumberFormat = new JButton(Messages.getText("Format"));
510
    		format = fframegrid.getLabelFormat();
488 511
    		btnNumberFormat.addActionListener(new java.awt.event.ActionListener() {
489 512
                public void actionPerformed(java.awt.event.ActionEvent e) {
490 513
                	openDecimalFormatDialog();
......
631 654
                        newFFrameGrid.setRotation(fframeview.getRotation());
632 655
                        newFFrameGrid.setHorizLabelRotation(getNfRotationHoriz().getInteger());
633 656
                        newFFrameGrid.setVertLabelRotation(getNfRotationVert().getInteger());
657
                        newFFrameGrid.setLabelAnchor(getCbLblAnchor().getSelectedCode());
634 658
                        newFFrameGrid.setLabelFormat(format);
635 659
                        if (getRbDistance().isSelected()) {
636 660
                        	newFFrameGrid.setUseNumDivisions(FFrameGrid.FIXED_DISTANCE_MODE); 
......
669 693
        WindowInfo m_viewinfo =
670 694
            new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
671 695
        m_viewinfo.setTitle(PluginServices.getText(this, "Grid_settings"));
672
        m_viewinfo.setWidth(480);
673
        m_viewinfo.setHeight(400);
696
        m_viewinfo.setWidth(620);
697
        m_viewinfo.setHeight(440);
674 698

  
675 699
        return m_viewinfo;
676 700
    }

Also available in: Unified diff