Draw lines with a specfic width and color

how to do it?
if given x arrays and y arrays, then connect points.
public void drawLine(int x1, int y1, int x2, int y2)This function doesn't have width and color.

thanks.
I met a problem that the color is obtained by
calculating RGB.
color=a*R+b*G+c*B;
a+b+c=1;
How to get it?huh?

Similar Messages

  • How to draw line with width at my will

    Dear frineds:
    I have following code to draw lines, but I was required:
    [1]. draw this line with some required width such as 0.2 or 0.9 or any width at my will
    [2]. each line after I draw, when I use mouse to click on it, it will be selected and then I can delete it,
    Please advice how to do it or any good example??
    Thanks
    sunny
    package com.draw;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              g.setFont(getFont());
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 2;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[1] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[1] = endPoint.y;
                   /*if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }Message was edited by:
    sunnymanman

    sonudevgan wrote:
    dear piz tell me how i can read integer from user my email id is [email protected]
    foolish, foolish question

  • Can j2me draw line with double values.

    Hi,
    Can any body know how to darw line in j2me with double values.
    I don't want use draw Line with int.
    Shall i use svg or j2me has solution.
    Thanks and regards,
    Rakesh.

    not possible
    graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]

  • Draw line with float values possible

    Hi,
    Using Canvas drawing is possible to draw line with float values.
    graphics.drawLine(int,int,int,int);
    graphics.drawLine(float,float,float,float);Thanks and regards,
    Rakesh.

    not possible
    graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]

  • How do I search for lines with a particular pattern and delete them when a match occurs

    How do I search for lines with a particular patter and delete them when a match occurs? For example delete lines containing SUB_NAME = "?" where ? is any string. 

    How do I search for lines with a particular patter and delete them when a match occurs? For example delete lines containing SUB_NAME = "?" where ? is any string. 
    Lines in what? And what language are you using to develop with?
    Are the lines in a text file? A RichTextBox? A TextBox? Some other control? A List(Of String)?
    Is there some expectation by you that by providing what you wrote in your question post that the knowledge in your mind about what you are thinking about will mysteriously emanate to anybody reading your post so all of the sudden your knowledge will
    become their knowledge and they will be able to provide you with an answer as they will suddenly understand what you are trying to do? Because that's probably impossible. Most people try providing enough information in a question so anybody, even stupid people
    like me, can understand what they want. Maybe you should try that. As well as selecting an appropriate forum for your question in the future. Usually a question like this is related to programming in a particular language therefore a language forum may be
    a good choice. Or not.
    La vida loca

  • How do you create aligned interactive text boxs in a PDF with the same width and height?

    how do you create aligned interactive text boxs in a PDF with the same width and height?
    Without free hand creating the sizing?

    Assuming by "interactive text boxes" you mean form fields; in Acrobat, make a form field, then copy it and paste. (GIve the pasted copy a different name so they don't genetate the same field feedback.) Now you have two fields of the exact same size. Shift-click or marquee-drag to select both, then right-click and choose a command from the Align, Distribute or Center menu.

  • Draw line with Gradient

    Hi,
    I am trying to implement drawing on canvas with two colors, red and blue.
    For example, to draw with the mouse "with two colors".
    I do not need a filled rectangle.
    I am looking into gradient but without any success.
    Is there a better way to draw a line with two colors?
    I also tried to use BasicStroke, but the line had an inner/outer strokes.
    Please help with suggestions.

    devboris wrote:
    ..For example, to draw with the mouse "with two colors".
    import java.awt.*;
    import javax.swing.*;
    class GradientLine {
        public static void main(String[] args) {
            GradientPanel gp = new GradientPanel();
            gp.setPreferredSize( new Dimension(600,400) );
            JOptionPane.showMessageDialog(null, gp);
    class GradientPanel extends JPanel {
        public void paintComponent(Graphics g) {
            // cast the Graphics objkect to a Graphics2D object
            // (G2D includes setPaint() method)
            Graphics2D g2 = (Graphics2D)g;
            GradientPaint bgPaint = new GradientPaint(
                0,
                0,
                Color.black,
                getWidth(),
                getHeight(),
                Color.white );
            g2.setPaint(bgPaint);
            g2.fillRect( 0, 0, getWidth(), getHeight() );
            GradientPaint fgPaint = new GradientPaint(
                0,
                0,
                Color.yellow,
                getWidth(),
                getHeight(),
                Color.red );
            // set the paint to a gradient.
            g2.setPaint(fgPaint);
            for (int ii=0; ii<getWidth()/10; ii++) {
                g2.drawLine( ii*10, 0, ii*10, getHeight() );
            for (int ii=0; ii<getHeight()/10; ii++) {
                g2.drawLine( 0, ii*15, getWidth(), ii*15 );
    }

  • Draw rotated image to given width and height

    Problem, if an image where width and height aren't equal is rotated and drawn again, the image is not drawn (stretched) to the full width.
    Below is an example to illustrate my problem. The top image is stretched to the full width, the other aint.
    Example picture: http://www.google.nl/intl/nl_nl/images/logo.gif
    What am I doing wrong??
    Greet Retep
    import java.awt.Font;
    import java.awt.Frame;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.geom.AffineTransform;
    import java.awt.image.AffineTransformOp;
    import java.awt.image.BufferedImage;
    import java.awt.image.BufferedImageOp;
    import java.io.BufferedInputStream;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JComponent;
    public class Test2 extends Frame{
         public static void main(String[] args)
              try {
                   new Test2();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public Test2() {
              super("Rotate picture");
              add(new RotateTest());
            addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
            setFont(new Font("default", Font.PLAIN, 24));
            setSize(300, 300);
            setVisible(true);
         class RotateTest extends JComponent {
             public void paint(Graphics g) {
                 Graphics2D g2d = (Graphics2D)g;
                 try {
                        BufferedImage image = ImageIO.read(new BufferedInputStream(new FileInputStream("C:/logo.gif")));
                        AffineTransform affineTransForm = new AffineTransform();
                      affineTransForm.rotate(Math.toRadians(270), image.getWidth(), 0); 
                      //flip
                      //affineTransForm.translate(0, image.getHeight());
                      //affineTransForm.scale(1, -1);
                      BufferedImageOp bufferedImageOp = new AffineTransformOp(affineTransForm,
                              AffineTransformOp.TYPE_BICUBIC);
                      BufferedImage image2 = bufferedImageOp.filter(image, null);
    //                  BufferedImage tempImage = new BufferedImage(image.getWidth(),image.getHeight(), image2.getType());
    //                Graphics2D graphics2D = tempImage.createGraphics();
    //                graphics2D.drawImage(image2, 0, 0, null);
    //                graphics2D.dispose();
                      g2d.drawImage(image, 5, 15, 280, 50, null);
                      g2d.drawImage(image2, 5, 70, 280, 50, null);
                      //g2d.drawImage(tempImage, 5, 125, 280, 50, null);
                      //g2d.drawImage(image, affineTransForm, null);
                      g2d.drawRect(5, 15, 280, 50);
                      g2d.drawRect(5, 70, 280, 50);
                   } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
    }

    Let's see if this helps...
    import java.awt.Font;
    import java.awt.Frame;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.geom.AffineTransform;
    import java.awt.geom.Rectangle2D;
    import java.awt.image.BufferedImage;
    import java.io.BufferedInputStream;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JComponent;
    public class T2Rx extends Frame {
        public static void main(String[] args) {
            try {
                new T2Rx();
            } catch (Exception e) {
               e.printStackTrace();
        public T2Rx() {
            super("Rotate picture");
            add(new RotateTest());
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
            setFont(new Font("default", Font.PLAIN, 24));
            setSize(300, 375);
            setLocation(200,200);
            setVisible(true);
        class RotateTest extends JComponent {
            BufferedImage image;
            RotateTest() {
                // You only need to do this one time. Save the image in a
                // a member variable so you can access it whenever you want.
                try {
                    image = ImageIO.read(new BufferedInputStream(
                                         new FileInputStream("logo.gif")));
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
            protected void paintComponent(Graphics g) {
                Graphics2D g2 = (Graphics2D)g;
                g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                                    RenderingHints.VALUE_INTERPOLATION_BICUBIC);
                int w = getWidth();
                int h = getHeight();
                BufferedImage scaled = scaleTo(image, 280, 50);
                int iw = scaled.getWidth();
                int ih = scaled.getHeight();
                double x = (w - iw)/2.0;
                double y = 1;
                g2.drawImage(scaled, (int)x, (int)y, this);
                g2.draw(new Rectangle2D.Double(x, y, iw, ih));
                double theta = Math.PI*3/2;
                x = (w - ih)/2.0;
                y = (ih + iw)/2.0 + 1;
                AffineTransform at = AffineTransform.getTranslateInstance(x, y);
                at.rotate(theta, iw/2.0, ih/2.0);
                g2.drawRenderedImage(scaled, at);
                g2.draw(at.createTransformedShape(new Rectangle2D.Double(0, 0, iw, ih)));
        private BufferedImage scaleTo(BufferedImage src, int w, int h) {
            //System.out.printf("type = %d%n", src.getType());
            // This type gives a better appearance after scaling.
            int type = BufferedImage.TYPE_INT_RGB;
            BufferedImage out = new BufferedImage(w, h, type);
            Graphics2D g2 = out.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                                RenderingHints.VALUE_INTERPOLATION_BICUBIC);
            g2.setBackground(getBackground());
                             //java.awt.Color.pink);  // just checking
            g2.clearRect(0, 0, w, h);
            double xScale = (double)w/src.getWidth();
            double yScale = (double)h/src.getHeight();
            double scale = Math.min(xScale, yScale);    // scale to fit
                           //Math.max(xScale, yScale);  // scale to fill
            double x = (w - scale*src.getWidth())/2;
            double y = (h - scale*src.getHeight())/2;
            AffineTransform at = AffineTransform.getTranslateInstance(x, y);
            at.scale(scale, scale);
            g2.drawRenderedImage(src, at);
            g2.dispose();
            return out;
    }

  • Drawing lines with smooth curves

    Hi,
    I'm trying to make a map for an underground system in a PC game and I want something similar to the one Transport for London has:
    http://www.tfl.gov.uk/assets/downloads/standard-tube-map.gif
    I'm a total newbie with Adobe Illustrator, but I'm trying it as I've heard it's what Transport for London uses.
    My question is then, what would be the easiest way of accomplishing multiple lines with different colours and smooth curves, like the lines in my reference picture?
    Thanks in advance,
    Martin

    Martin,
    In addition to what Kurt said, you may draw paths with straight segments and then round the corners afterwards, using Effect>Stylise>Round Corners (you may Object>Expand Appearance to obtain actual roundings).

  • Problem with adjusting both transparency and color of an object

    I am writing a program where when an object is picked, both it's transparency and color will be altered (the object will become opaque, and its color will turn to a predefined "selected" color), while the previously selected object will return to its original transparency and color. I am able to get this to work, except that objects that were picked two or more picks ago will remain in the selected color, albeit in their original transparency. This problem only seems to occur when transparency is factored in. The picking/color & transparency altering code is as follows.
    public class PickingListener extends MouseAdapter {
         private PickCanvas pickCanvas;
         private TextDisplay overlay;
         private Primitive p;
         private Primitive lastP;
         private ColoringAttributes origColor;
         private TransparencyAttributes origTransparency;
         public PickingListener(PickCanvas pickCanvasArg, TextDisplay overlayArg) {
              pickCanvas = pickCanvasArg;
              overlay = overlayArg;
         public void mouseClicked(MouseEvent e) {
              pickCanvas.setShapeLocation(e);
              PickResult result = pickCanvas.pickClosest();
              if (result == null) {
                   System.out.println("Nothing picked");
              } else {
                   p = (Primitive) result.getNode(PickResult.PRIMITIVE);
                   if (p != null) {
                        setSelectedColor();
                        overlay.setPickedBarInfo((BarInformation) p.getUserData());
                   else
                        System.out.println("null");
         private void setSelectedColor() {
              ColoringAttributes barCA = new ColoringAttributes();
              TransparencyAttributes barTransp = new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f);
              barCA.setColor(ColorConstants.SELECTED);
              if (lastP != null) {
                   lastP.getAppearance().setColoringAttributes(origColor);
                   lastP.getAppearance().setTransparencyAttributes(origTransparency);
              origColor = p.getAppearance().getColoringAttributes();
              origTransparency = p.getAppearance().getTransparencyAttributes();
              p.getAppearance().setColoringAttributes(barCA);
              p.getAppearance().setTransparencyAttributes(barTransp);
              lastP = p;
    }Capabilities to alter the primitive's color and transparency are all set.
         barAppearance.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
              barAppearance.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
              barAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);          barAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ);
    ColoringAttributes barCA = new ColoringAttributes();
    barCA.setCapability(ColoringAttributes.ALLOW_COLOR_WRITE);
    barCA.setCapability(ColoringAttributes.ALLOW_COLOR_READ);)
    Any insight as to why this would occur would be greatly appreciated.
    -Adrian Benton

    A Behavior is the preferred way to make changes in a scenegraph. Here is an example from a previous post that changes the appearance of a shape when it collides with another shape.
    The javadoc for javax.media.j3d.Behavior appears to refer to the issue you have.
    Transparencies are confusing, different display adapters deal with them differently. Suggest you search the forum at
    http://forums.java.net/jive/forum.jspa?forumID=70
    for more detailed information.
    regards
    class CollisionDetector extends Behavior {
      private static final Color3f highlightColor = new Color3f(0.0f, 1.0f, 0.0f);
      private static final ColoringAttributes highlight = new ColoringAttributes(
          highlightColor, ColoringAttributes.SHADE_GOURAUD);
      private boolean inCollision = false;
      private Shape3D shape;
      private ColoringAttributes shapeColoring;
      private Appearance shapeAppearance;
      private WakeupOnCollisionEntry wEnter;
      private WakeupOnCollisionExit wExit;
      public CollisionDetector(Shape3D s) {
        shape = s;
        shapeAppearance = shape.getAppearance();
        shapeColoring = shapeAppearance.getColoringAttributes();
        inCollision = false;
      public void initialize() {
        wEnter = new WakeupOnCollisionEntry(shape);
        wExit = new WakeupOnCollisionExit(shape);
        wakeupOn(wEnter);
      public void processStimulus(Enumeration criteria) {
        inCollision = !inCollision;
        if (inCollision) {
          shapeAppearance.setColoringAttributes(highlight);
          wakeupOn(wExit);
        } else {
          shapeAppearance.setColoringAttributes(shapeColoring);
          wakeupOn(wEnter);
    }

  • Prob with fixed column widths and word wrapping in viewer

    i have a report where each record has a very long paragraph of text in it.
    In desktop and plus, the text column is at a fixed width and the text just wraps nicely according to the column width.
    But in Viewer, the column widths do not stay fixed, the text does not wrap, and the long text is displayed in a single line that completely stretches the column width off the page and requires a horizontal scroll bar.
    is there anyway to fix the column width in viewer, have the text naturally wrap, and prevent the column stretching. All word wrapping settings are on, but seem to have no effect. I can't seem to find any solution to this.
    Thanks...

    Hi Pritam,
    Per my understanding that you can't see the vertical scrollbar of the ReportViewer controls 2012 to scroll for the grid rows, but can see the vertical scrollbar of the web application, you also can't fix the headers while scrolling, right?
    I have tested on my local environment and can't reproduce your issue, but you have an alternative way to add some css  to the web form's source code to display the vertical scrollbar.
    Details information below for your reference:
    Please check below properties setting of the reportviewer which control the visibility of the scrollbar:
    AsyncRendering="true"
    SizeToReportContent="false"
    Please check if this problem also occur on other version of IE and other type of browser.
    Please check if you have done correct setting of the Fix data to freeze the table header as the step of below:
    http://technet.microsoft.com/en-us/library/bb934257(v=sql.100).aspx
    If step1 doesn't work, please click the source of webform.aspx and add below CSS to add the vertical scrollbar manually:
    #ReportViewer1 {
              overflow-y: scroll;
    Run the application you will see it display as below:
    Similar thread for your reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/f96b3b56-e920-411b-82ea-40467c922e66/reportviewer-control-vertical-scroll-bars
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • How to generate a pulse train with different pulse width and delay?

    How to generate a triggered pulse train with different pulse width. for example, after each trigger signal, let's say 2 ms, then the counter output a pulse with pulsewidth of 1 ms, and then after 3 ms delay after the first pulse, the second pulse was generated with a pulse width of 4 ms.  Next cycle when the trigger signal comes, the same two pulses will be generated and so on. Is it possible to achieve this by using 6601 counter card? and if yes, how to achieve this? Thanks!

    Unfortunately you can not create a hardware timed pulse train with different widths on each pulse from a counter. Whilst it can be changed on the fly using software, since you require a hardware triggered signal getting the software involved will not give a huge amount of accuracy when the pulse will actually change.
    So in short you can't use your 6601 card (or a counter timer) to achieve this
    There are three possible Alternative solutions
    1 You could use a high speed digital IO device such as the (6533/34) to generate your variable signal which would require setting up the pulse train as a series of states based around the burst transmission mode where the clock would give you your specific timing.
    2 A timed analogy output (for example on a MIO card with a clock (PCI-6220 / 62xx), i.e. Not the 6704 style static analogy output cards)
    3 A high speed digital waveform card such as the (, 656x , 655x, 654x, 6534, 6533 (http://www.ni.com/modularinstruments/find_right.ht​m) ) this could then be scripted to work with your triggering and also there is a digital waveform editor which will enable you to set up the pattern you wish to generate (http://sine.ni.com/nips/cds/view/p/lang/en/nid/135​55) 
    Hope that helps
    Tim Matthews
    NI (UK)

  • Adding text to indesign pages with specific font ,size,and color using javascript

    Hello,
    Using javascript i am able to add some text to each page of an indesign file.
    myNewText = "SOME TEXT"
    myTextFrame = myPage.textFrames.item(0);
    tempframe = myTextFrame.contents;
    myTextFrame.contents =  myNewText + tempframe ;
    But i want to specify the font used,size and color for that text.
    When i try the code mentioned in indesign javascript scripting guide
    myNewText .appliedFont = app.fonts.item("Times New Roman");
    myNewText .fontStyle = "Bold";
    nothing gets changed and font family already used stays the same.
    How can i do that only for the added text and not for the whole content?I dont want to add the text to a new text frame I want to append it to the existing text frame.
    And is there a way to specify font size too?
    thank you

    There's a mixup going on here. Let's see if we can sort out some of it
    at least.
    If you just want to add new text to an already existing text frame,
    that's easy:
    myTextFrame.contents += "Hello";
    But if you want the new text to have unique formatting, it's a little
    more complicated.
    There are two simple ways to do it, I think:
    1. Create a temporary text frame, as you have done, and add the text,
    and format everything in there. Then move() that formatted text to the
    end of myTextFrame and delete the temporary frame:
    tempFrame = app.activeDocument.textFrames.add();
    tempFrame.contents = "New Text";
    tempFrame.paragraphs[0].appliedFont = app.fonts.itemByName("Times New
    Roman"); // etc...
    tempFrame.paragraphs[0].move(myTextFrame.insertionPoints[-1],
    LocationOptions.AFTER);
    tempFrame.remove();
    2. The other option, is to add the text directly to your textFrame. But
    if you want to format only that text, you have to store where the text
    started:
    myTextFrame = app.selection[0];
    firstInsertionPoint = myTextFrame.insertionPoints[-1].index;
    myTextFrame.contents += "New Text";
    myAddedText =
    myTextFrame.characters.itemByRange(myTextFrame.insertionPoints[firstInsertionPoint],
    myTextFrame.insertionPoints[-1]);
    myAddedText.appliedFont = app.fonts.itemByName("Trajan Pro"); // etc.
    What you've done in your sample script, however, is to try to apply a
    font to a simple JavaScript string. It won't work, but the way you did
    it, it won't throw an error either, because in fact you've created a new
    property of your string. (myString = "Hello"; myString.appliedFont =
    "Times"; // myString now has a Javascript property called appliedFont --
    but that's nothing to do with InDesign!)
    HTH,
    Ariel

  • Problem with Border Container width and height in %

    I want to use bordercontainer in Vgroup and specify its width and height in % form.
    But when we try to set width less than 18% or height less than 10% it takes the default values.
    Why is it so???
    Thanks in advance.
    Ronak Shah

    Probably a minWidth and minHeight set somewhere

  • Increasing width and color of slider bars

    I've tried searching for this one and haven't come up with anything, so, at the risk of bringing up a topic that's been already answered somewhere else (please if so, tell me where) here goes:
    I want to center images at higher magnifications. Just because you can put your cursor
    on the IMAGE and use the scroll wheel to make it go up and down doesn't mean you can make the image go right and left at the same time. Personally, I'd like to continue to use the scroll wheel to zoom in and out (done in preferences, yes) and put the cursor on either the vertical and horizontal slider bars and use the wheel to move the image up or down or right or left. But if you've ever tried to place your cursor on these narrow-*** slider bars you know it's hell to hit those things very
    easily because they are barely 1/4" wide--if that.
    So the question remains: How can a user increase the width
    of these narrow little bars? Is there a way to do this?
    Also the color of the bars is very near the same color and value as the
    area surrounding it, making it difficult to see. Is it possible to alter the
    color of the bars to something more visible, like say, a brighter color and/or different value

    "I entirely agree that the panel sliders are narrow. However, I find the panel sliders to be entirely unnecessary. As Ian suggested you can scroll with the mouse wheel."
    Wolf, thanks for the reply. Perhaps it is a matter of my non-grasp of the terminology/nomenclature of the various parts of the photoshop
    viewing area. What I am saying is that the slider bars on the right and the bottom of the panel (making the image go up and down and right and left respectively) are quite narrow and are the exact same color/value as the corresponding white background of most of my images, making this narrow bar difficult to see on a laptop 3' away and even more difficult to put the cursor on easily.
    When you put your cursor on the image itself, I prefer to increase/decrease the magnification as set in preferences.
    when you put your cursor on the slider bar on the right side and scroll with the mouse wheel, the image goes up and down. When you put your cursor on the bottom slider bar and scroll with the mouse wheel, the image moves right or left.
    However, these aforesaid bars are so narrow that it's a pain in the a** to put the cursor on them to start with. Now, if these slider
    bars could be made WIDER (and even perhaps a different color from the
    area directly adjacent to it most of the time) it would be easier
    to perform the tasks described above.
    So I am simply trying to find out (because I have looked and looked) if perhaps these bars can be made wider. This is what Jeff was originally asking and represents to me an easier solution in that one has only to use one's mouse instead of using another hand and hitting shortcut keys and changing modes, etc.
    I'm sorry if I'm not making this clear enough. Despite my poor grasp of descriptive english to make my question clear, I've been with P/S since version 3.0 and know about grid view, loupe view, etc. I just
    wanted to find out if it were possible to widen the slider bars.
    Thanks to you and Mr.McWilliams for trying to help.

Maybe you are looking for

  • Purchase Requisition Automatically Generating Issue

    Hi Guru: I failed to generate the purchase requistion after MRP running via transaction md03,please see my setting of MRP1-4 as below: MRP1:PD as MRP type,then the reorder point is 300,the measurement of unit is KG,I set FX as lot size,and fixed lot

  • Sccm console machine showing Client=yes Active =no

    Sccm console machine showing Client=yes Active =no any troubleshooting tips also machine was pingable and with current hardware inventory

  • Acrobat and Shockwave will not stay enabled.

    Each time I boot up my pc, I have to enable Acrobat and Shockwave.  Uninstalling and reinstalling these programs does not fix the problem. I run Windows 7 and IE 10.

  • IPhone cannot view movies from dotMac site if password protected

    I input a movie in a iWeb page, password protect the site, publish it and then try to view the movie with my iPhone. I can get into the page after entering my userid and password, but when I select the movie, I get an error message stating "Error pla

  • Installing NW04s preview version fails in step 29

    i get the error below: WARNING 2006-05-19 10:53:21 Execution of the command "C:\j2sdk1.4.2_09\bin\java.exe -Xmx256M -Djava.ext.dirs=C:\usr\sap\J2E\JC01\SDM/program/lib;C:/j2sdk1.4.2_09/jre/lib/ext -jar C:\usr\sap\J2E\JC01\SDM/program/bin/SDM.jar depl