Subversion Repositories wimsdev

Rev

Rev 3653 | Rev 5890 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3653 Rev 4807
Line 629... Line 629...
629
                if(fm.stringWidth(maxstring) < xsize){
629
                if(fm.stringWidth(maxstring) < xsize){
630
                    does_not_fit = false;
630
                    does_not_fit = false;
631
                }
631
                }
632
            }
632
            }
633
            System.out.println("xsize ("+xsize+") of applet too small...I've adjusted fontsize to "+fontsize);
633
            System.out.println("xsize ("+xsize+") of applet too small...I've adjusted fontsize to "+fontsize);
-
 
634
            font  = new Font(fontname,Font.BOLD,fontsize);
-
 
635
            fm = g.getFontMetrics(font);
634
        }
636
        }
635
        fontheight =(int) (0.6*fm.getHeight());
637
        fontheight =(int) (0.6*fm.getHeight());
636
        if( fontheight > ystep ){ // fonts will overlap !! decrease ygrid...
638
        if( fontheight > ystep ){ // fonts will overlap !! decrease ygrid...
637
            System.out.println("I will decrease number of horizontal lines: fonts will overlap...\nuse more xlines to overcome this.");
639
            System.out.println("I will decrease number of horizontal lines: fonts will overlap...\nuse more xlines to overcome this.");
638
            ystep =  fontheight;
640
            ystep =  fontheight;
Line 723... Line 725...
723
                );
725
                );
724
                if(right){
726
                if(right){
725
                    backg.drawString(
727
                    backg.drawString(
726
                        ((GridLine)objects.elementAt(i)).getText(),
728
                        ((GridLine)objects.elementAt(i)).getText(),
727
                        ((GridLine)objects.elementAt(i)).getX2()+linewidth,
729
                        ((GridLine)objects.elementAt(i)).getX2()+linewidth,
-
 
730
                        ((GridLine)objects.elementAt(i)).getY2()
728
                        ((GridLine)objects.elementAt(i)).getY2()+(fontheight-linewidth)/2
731
                        //((GridLine)objects.elementAt(i)).getY2()+(fontheight-linewidth)/2
729
                    );
732
                    );
730
                }
733
                }
731
                else
734
                else
732
                {
735
                {
733
                    backg.drawString(
736
                    backg.drawString(
734
                        ((GridLine)objects.elementAt(i)).getText(),
737
                        ((GridLine)objects.elementAt(i)).getText(),
735
                        ((GridLine)objects.elementAt(i)).getX1()-linewidth-fontwidth,
738
                        ((GridLine)objects.elementAt(i)).getX1()-linewidth-fontwidth,
-
 
739
                        ((GridLine)objects.elementAt(i)).getY2()
736
                        ((GridLine)objects.elementAt(i)).getY2()+(fontheight-linewidth)/2
740
                        //((GridLine)objects.elementAt(i)).getY2()+(fontheight-linewidth)/2
737
                    );
741
                    );
738
                }
742
                }
739
                if(i == objcnt - 1){
743
                if(i == objcnt - 1){
740
                    reverse= ((GridLine)objects.elementAt(i)).isSegment();
744
                    reverse= ((GridLine)objects.elementAt(i)).isSegment();
741
                }
745
                }
Line 796... Line 800...
796
                    );
800
                    );
797
                    if(right){
801
                    if(right){
798
                        backg.drawString(
802
                        backg.drawString(
799
                            ((GridLine)objects.elementAt(i)).getText(),
803
                            ((GridLine)objects.elementAt(i)).getText(),
800
                            ((GridLine)objects.elementAt(i)).getX2()+linewidth, // ---- +
804
                            ((GridLine)objects.elementAt(i)).getX2()+linewidth, // ---- +
-
 
805
                            ((GridLine)objects.elementAt(i)).getY2()
801
                            ((GridLine)objects.elementAt(i)).getY2()+(fontheight-linewidth)/2
806
                            //((GridLine)objects.elementAt(i)).getY2()+(fontheight-linewidth)/2
802
                        );
807
                        );
803
                    }
808
                    }
804
                    else //french
809
                    else //french
805
                    {
810
                    {
806
                        backg.drawString(
811
                        backg.drawString(