Drawing Custom Lines having PATTERN_USER_DEFINED in Java3D Canvas

Hi All,
I want to draw lines having LineAttributes.PATTERN_USER_DEFINED.
How can i draw a line of this look.
and so on.
Thanks for ur help in Advance.
Abhay

ok this code looks quite complicated :-)
i haven't had time to read it in detail, so i'm just going to make a
suggestion:
In your paint method are you drawing a buffered image to
the screen. If you're drawing a buffered image to the screen then there
is no reason why the canvas should change unless you're modiying the
buffered image at some point without realizing it.

Similar Messages

  • How to draw custom line in crystal report without manually entering value?

    Hi,
    I have a bubble chart and want to represent custom lines one in x-axis and one in y-axis at the value arrived based upon an internal calculation.There is an option to manually enter value for custom line.
    But i want to generate custom line at runtime without manually entering it.
    Can somebody help out?
    Regards,
    Felix

    Not sure what this has to do with Database Connectivity?
    Moved it to the Report Designer forum. If you are using code then specify what Report engine and version you are using and we can move it again.

  • How to add custom line for today's date

    Hi,
    I want to add one vertical line for today's date on my line chart.
    Is it possible to draw custom line dynamically in line chart.
    Thanks in advance
    Madhuri

    I think you will probably need CRChart by ThreeD Graphics (www.threedgraphics.com).  AFAIK, it's written by the guys who supply the charting module to Crystal, so integrates 100%, even if it's a bit fiddly.
    It's a bit pricey (more than CR!), but if you need that functionality, it's about your only option. I've bought it do add a 'your average' linesymbol and 'everyone's average' linesymbol to a chart.
    Essentially, it uses macros to plot user defined lines, box fills, shapes etc onto your chart.
    You put something like this into the text fields of the chart:
    @user_line 0,0,3,100 = draw a line from the 0,0 point to the 3rd group, 50th y-value.
    You can use variable to define these points, so if you have a chart in a group, it'll display a different line position for each group.

  • Custom Control Help: Draw a line and output start and end points

    I'm looking to find or make a custom control (or simple subVI) that will appear as a 100x100 unit grid and allow me to draw a line from one point to another on that grid. It will then output the (x,y) of the starting and end point of that line on the grid.  Any help or ideas?
    Thanks,
    Steve
    LabVIEW 2009 SP1
    Solved!
    Go to Solution.

    What you basically want is a loop with an event structure where you process Mouse Down, Move and Up events for your controls. There are any number of ways of implementing something like this, but this one will probably be the simplest:
    Use a multicolumn listbox or a table for your grid. Hide the scrollbars and headers.
    You can use the ActiveCell property with -2,-2 to select all cells. You can then use the cell size property to set the exact size of the cell.
    Next, you put a picture control on top of the table and color its background transparent so that the table shows through. You use property node to make sure the two are aligned to exactly the same spot and size.
    You use the mouse events on the picture control to detect the clicks and moves.
    You use the table's Point to Row Column method to translate the event's position data to a cell.
    You use the picture control VIs to draw the line on the picture based on that data.
    You can even color the selected cells in the table using the table properties.
    If you want to simplify things somewhat, you can also use the timeout event instead of the Mouse Move event to draw the line, but then you'll need to keep the timeout value in a shift register and reset it to -1 (no timeout) when the Mouse Up event happens.
    I would also suggest processing Mouse Enter and Leave events to change the cursor and cancel if the user leaves in the middle of dragging.
    Try to take over the world!

  • "I want to draw a line, and it will highlight when I click it."

    I am currently working on a project right now. My project is a structural analysis software for civil engineers. Our project is already at it's infant
    stage of development. I am having trouble with how to implement drawing on a canvas. Heres the specs:
    -There are nodes on the drawing board illustrated by dots.
    -Lines must be drawn connecting the nodes.
    -Nodes must be a separate object where it could respond to mouse
    events.
    -Lines must also be a separate object where it could respond to mouse
    events.
    -Nodes and lines contain mathematical attributes, color information.
    -I can instantly delete a line, or change its attributes by selecting
    it.
    Heres what I have imagined:
    -I am going to draw my Nodes in a JPanel which implements a
    mouseListener.
    -Whenever I want to add nodes to the drawing board, I only have to add
    the Node objects i created.
    No problem with the nodes. Problem is in the lines i will be drawingconnecting one node to another.
    -I tried manual live drawing of the lines as the mouse moves. Now its
    flat on the drawing board. It can't be touched!
    -I still don't have any idea how to implement the line that it could
    respond to mouse events.
    -If I try to draw it in a JPanel with mouseListener, a JPanel is square
    so if I move my mouse to point in to the line drawn on the JPanel, it
    will already respond before the mouse could reach the line image. One
    thing also, it could overlap other JPanels.
    -The JPanel idea came up to my mind coz I thought these objects could
    be
    selectable custom components.
    -Now I realized JPanel is not the ANSWER!
    In simple saying:
    "I want to draw a line, and it will highlight when I click it."
    Stubborn Newbie,
    Edgar

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class SelectingLines extends JPanel
        Line2D.Double[] lines;
        int selectedIndex = -1;
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(lines == null)
                initLines();
            for(int j = 0; j < lines.length; j++)
                Color color = Color.blue;
                if(j == selectedIndex)
                    color = Color.green.darker();
                g2.setPaint(color);
                g2.draw(lines[j]);
        public void setSelection(int index)
            selectedIndex = index;
            repaint();
        private void initLines()
            lines = new Line2D.Double[3];
            int w = getWidth();
            int h = getHeight();
            lines[0] = new Line2D.Double(w/8, h/8, w/3, h/6);
            lines[1] = new Line2D.Double(w/3, h/6, w/2, h/2);
            lines[2] = new Line2D.Double(w/2, h/2, w*5/8, h*7/12);
        public static void main(String[] args)
            SelectingLines selectPanel = new SelectingLines();
            selectPanel.addMouseListener(new LineSelector(selectPanel));
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(selectPanel);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class LineSelector extends MouseAdapter
        SelectingLines selectingLines;
        Rectangle r;
        final int S = 4;
        public LineSelector(SelectingLines sl)
            selectingLines = sl;
            r = new Rectangle(S, S);
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            r.setLocation(p.x-S/2, p.y-S/2);
            Line2D.Double[] lines = selectingLines.lines;
            int index = -1;
            for(int j = 0; j < lines.length; j++)
                if(lines[j].intersects(r))
                    index = j;
                    break;
            if(index != selectingLines.selectedIndex)
                selectingLines.setSelection(index);
    }

  • RSBBS Jump: AR Line Item Query to R3 Customer Line Item Display

    I am attempting to create a 'Jump Target' from the 0FIAR_C03 AR Line Item Infocube to the R3 FBL5N Customer Line Item Display transaction.
    The query that the jump is to be performed from an Aging query.
    The user will be running this query for all transactions posted up to and including the end of the previous calendar month. The posting date is provided by the user when submitting the query (via variable 0P_KEYD2). The aging report works just fine.
    Where I'm having the problem is when the user wishes to jump to the R3 transaction FBL5N to display the Customer Line Items. The user wants the 'Line Item Selection' in R3 to inlcude 'Open Items' (this button should be selected -- it is the default setting) where 'Open at Key Date' is to be derived from the query result in the Excel workbook.
    I have created the RSBBS Sender/Receiver Assignment so that it goes and retrieves the line items from R3 for the correct customer. However, I have not been able to figure out how to populate the 'Open at Key Date' with the end Posting Date (OPSTNG_DATE) from the query.
    I've tried every combination I can imagine in the 'Assignment Details' section in RSBBS, but so far I have not been able to make it work.
    Has anyone else out there tried this?
    If you have, were you able to populate the 'Open at Key Date' (ALLGSTID) field in the R3 FBL5N transaction? If you were able to do this, how did you do it?
    All ideas appreciated . . .

    I'm still hoping that someone can help with this issue.
    Here's a repeat of the original question:
    I am attempting to create a 'Jump Target' from the 0FIAR_C03 AR Line Item Infocube to the R3 FBL5N Customer Line Item Display transaction.
    The query that the jump is to be performed from an Aging query.
    The user will be running this query for all transactions posted up to and including the end of the previous calendar month. The posting date is provided by the user when submitting the query (via variable 0P_KEYD2). The aging report works just fine.
    Where I'm having the problem is when the user wishes to jump to the R3 transaction FBL5N to display the Customer Line Items. The user wants the 'Line Item Selection' in R3 to inlcude 'Open Items' (this button should be selected -- it is the default setting) where 'Open at Key Date' is to be derived from the query result in the Excel workbook.
    I have created the RSBBS Sender/Receiver Assignment so that it goes and retrieves the line items from R3 for the correct customer. However, I have not been able to figure out how to populate the 'Open at Key Date' with the end Posting Date (OPSTNG_DATE) from the query.
    I've tried every combination I can imagine in the 'Assignment Details' section in RSBBS, but so far I have not been able to make it work.
    Has anyone else out there tried this?
    If you have, were you able to populate the 'Open at Key Date' (ALLGSTID) field in the R3 FBL5N transaction? If you were able to do this, how did you do it?
    All ideas appreciated . . .

  • Mass change of payment in customer line item for all open line item.

    Hello,
    We have updated the new payment as per the new agreement with customer in customer master. We want this new payment term should also be updated in all the open invoices which are not cleared. Is there are way we can do the mass change in Payment term as the open line item in the customer where line item are more than 50. Please let me know the transaction code for the mass change of payment term in Customer account balances.
    Thanks and Regards,
    Rajesh Kumar Mantri

    Hi
    you can find the way to change the payment terms
    first check weather the payment term field is having change option in your document change rules in the line item for you customers.
    Financial Accounting (New)Financial Accounting Global Settings (New)DocumentRules for Changing DocumentsDocument Change Rules, Line Item
    if the payment term BSEG-ZTERM(payment term) is there for your customer and having deselcted check box for changing document you cannot change payment term for your company code.
    This can done client level or company code level.
    if the payterm  can be changed you do changes to payment terms mass level.
    Thanks
    ANJI

  • FBL5N - in Rule set - It is a Display customer line items

    Dear All,
    We observed that FBL5N - Display customer line items in Standard SoD rule set under function AR07  addressing a risk of S022.
    Unless there are t-codes of FD03 or FB02 this t-code does not allow to change the payment terms of the customer.
    We are having a challenge from the client that FBL5N is a display t-code and why it is there in rule set.
    Has anybody came across this scenario? If yes, what is the underlying risk for this FBL5N independently.
    Is there any SAP Note for this t-code like ME23N from SAP.
    Thanks and Best Regards,
    Srihari.K

    Hi Christian,
    We checked the authorization objects as well enabled in GRC rule set as below:
    F_BKPF_BUK - Docume t Authorization document for company codes - 01 or 02 - Enable.
    Inspite of this access, FBL5N cannot be used to change the document for payment terms and assignments without FB02 t-code
    assignment in the role.
    Independently FBL5N cannot be used for any change or create activity except Display customer line items.
    Please advise
    Thanks and Best Regards,
    Srihari.K

  • How to draw a line in smartforms!

    Hello ABAPers,
    In smartform, I am having a table. Every 3 rows I want to draw a line. How can I do that in Smartforms?
    Thanks,

    hi Naren,
    Check these links out
    drawing line in smartforms
    Re: Smartforms - Line Height
    Re: smartforms blank line
    Regards,
    Santosh

  • Adding text to java3d canvas

    Hi,
    I have a java3d program running.Now in my running java3d program in the java3d scene i have to draw some lines by dragging the mouse (I am able to do that)....then at any point on some event i should be able to add text (say "these to lines are parallel")..
    Can you explain or give me a working example which has the similar functionality.This will be a great help. As we are new to java3d technology.this is very urgent.Thanks in advance
    shyam

    Try this:
    import java.awt.Font;
    import. javax.vecmath.Color3f;
    int size= 120;
    Text2D textObject = new Text2D("These two lines are parallel", new Color3f(1f, 1f, 1f),
    "Serif", size, Font.BOLD);
    yourTranslationGroup.addChild(textObject);
    Note: you may have to add a rotation, to make sure the text us oriented such that it's perpendicular to the camera.
    Cheers,
    -jeroen

  • Draw a line after zoom in

    Hi All,
    I want to draw a line after zooming in/out the image. If the image is not scaled, then ever thing is fine. But once I scaled the image and draw the line, the position is not coming correctly. Can you correct me, what's my mistake?
    package imagetest;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class ZoomAndDraw extends JPanel
        private java.awt.image.BufferedImage image = null;
        private Line2D.Double line = null;
        private double scale = 1.0;
        private int value = 16;
        private double translateX = 0.0;
        private double translateY = 0.0;
        private MouseManager manager = null;
        public ZoomAndDraw()
            line = new Line2D.Double();
            readImage();
            manager = new MouseManager(this);
            addMouseListener(manager);
            addMouseMotionListener(manager);
        private void readImage()
            try
                image = javax.imageio.ImageIO.read(new java.io.File("D:/IMG.JPG"));
            catch (Exception ex)
        @Override
        public Dimension getPreferredSize()
            if (image != null)
                int w = (int) (scale * image.getWidth());
                int h = (int) (scale * image.getHeight());
                return new Dimension(w, h);
            return new Dimension(640, 480);
        @Override
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g;
            if (image == null)
                return;
            double x = (getWidth() - scale * image.getWidth()) / 2;
            double y = (getHeight() - scale * image.getHeight()) / 2;
            g2.translate(x, y); // move to center of image
            g2.scale(scale, scale); // scale
            translateX = 0 - x * (1 / scale);
            translateY = 0 - y * (1 / scale);
            g2.translate(translateX, translateY); // move back
            g2.drawImage(image, 0, 0, this);
            g2.setColor(Color.RED);
            g2.draw(line);
            g.dispose();
        public void setLine(Point start, Point end)
            line.setLine(start, end);
            repaint();
        public void addLine(Point start, Point end)
            line.setLine(start, end);
            repaint();
        public void ZoomIn()
            value++;
            scale = (value + 4) / 20.0;
            revalidate();
            repaint();
        public void ZoomOut()
            if (value <= -3)
                return;
            value--;
            scale = (value + 4) / 20.0;
            revalidate();
            repaint();
        class MouseManager extends MouseAdapter
            ZoomAndDraw component;
            Point start;
            boolean dragging = false;
            public MouseManager(ZoomAndDraw displayPanel)
                component = displayPanel;
            @Override
            public void mousePressed(MouseEvent e)
                start = e.getPoint();
                dragging = true;
            @Override
            public void mouseReleased(MouseEvent e)
                if (dragging)
                    component.addLine(start, e.getPoint());
                    component.repaint();
                dragging = false;
            @Override
            public void mouseDragged(MouseEvent e)
                Point end = e.getPoint();
                if (dragging)
                    component.setLine(start, end);
                    component.repaint();
                else
                    start = end;
        public static void main(String[] args)
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            ZoomAndDraw zoomAndDraw = new ZoomAndDraw();
            //Zoom in call
            zoomAndDraw.ZoomIn();
            zoomAndDraw.ZoomIn();
            zoomAndDraw.ZoomIn();
            frame.add(zoomAndDraw);
            frame.setPreferredSize(new Dimension(640, 480));
            frame.setSize(new Dimension(640, 480));
            frame.setVisible(true);
    }Thanks and Regards
    Raja.

    Hi,
    I'm having one more doubt. Just assume, after calling the ZoomIn(), I am drawing a line.
    Subsequent ZoomIn() calls (let's say 5 times), changed the actual line position. How do I synchronize the zoom in call with the line coordinates?
    public void FireZoomIn()
            new Thread(new Runnable()
                public void run()
                    try
                        Thread.sleep(3000);
                    catch (InterruptedException iex)
                    int count = 0;
                    while (count++ < 5)
                        ZoomIn();
            }).start();
    public void mouseReleased(MouseEvent e)
                if (dragging)
                    component.addLine(start, e.getPoint());
                    component.repaint();
                    component.FireZoomIn();
                dragging = false;
            }Thanks and Regards
    Raja.

  • Customer Line Item - Profit Center

    Hi All,
    In Txn. FB60, Customer Line item, I need to bring Profit Center.
    Can you please pass some ideas, if possible.
    Regards,

    If are on classic GL you cannot have profit center on Customer Line item.
    The reason is simple:
    If you are having
    Customer Account Dr 1000
    To Income Account 1 100 Profit Center A
    To Income Account 2 200 Profit Center B
    To Income Account 3 500 Profit Center C
    Which profit center do you want now in Customer Account??
    In classic GL you do not have document splitting, hence, this CANNOT be achieved.
    Regards,
    Ravi

  • Draw a line it creates a path???

    Hi
    Just installed Fireworks 8 and everytime I draw a basic line
    it creates a path Im used to fireworks four so is this normal ?
    Surely it should just draw the line on the image and not
    create seperate paths for each one ..far as I know I never selected
    paths just the line tool ..any ideas ?

    If you really need to draw a plain, bitmap line, use the
    pencil tool. If
    you want more control over the style of your bitmap lines,
    use the brush
    tool. What you end up with one bitmap object with hundreds of
    "non-editable" lines, so you are not any further ahead, IMHO.
    Use the Line tool and name your lines in the Layers panel if
    you are
    concerned about not knowing which line is which. You can also
    group your
    lines to reduce the number of objects within the layers
    panel.
    There is also a connector line auto shape that might be
    useful for you.
    It's not as functional as connector objects within flowchart
    diagram
    programs like SmartDraw, but it's usable.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    Extending Knowledge, Daily
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    news://forums.macromedia.com/macromedia.fireworks
    news://forums.macromedia.com/macromedia.dreamweaver
    Alex Mariño wrote:
    > The advantages of having paths as opposed to bitmap
    lines are:
    >
    > 1. Smaller file size.
    > 2. Ease of further manipulation.
    >
    > alex
    >
    >
    >
    >
    >
    > crashpolo wrote:
    >> How do you draw a basic line then without creating a
    path ....say a
    >> black lien linking to rectangles together ?
    >>
    >> If i draw a large diagram with lines on it im gonn
    have hundreds of
    >> paths this cant be right can it ?
    >>

  • Drawing bold line

    Hello,
    I know how to draw a line on a canvas for example, using the drawLine(...) method. But I would like to make the line like if it was bold. I would like to change de weight of the line. How to do this ?
    Thank you very much.
    David Mayor

    use the setStroke of Graphics2D
    public void paint(Graphics g)
         super.paint(g);
         g.setColor(Color.red);
         Graphics2D g2 = (Graphics2D)g;
         g2.setStroke(new BasicStroke(2.0));
         g2.drawLine(10,10,200,200);
         g2.dispose();
    } Noah

  • Suggestion to draw a line between two points...

    I have the XYZ position of 2 points, I would like to draw a line between those points. I have tried with a cylinder and it did not work as I expect...I guess a better method exist in Java3D... Do you have any suggestions??
    thanks
    Pete

    try the LineArray class.

Maybe you are looking for

  • Creation of one inspection lot for more than 1physical sample

    hello SAP, we have one common question.I have created 3 physical sample 20000006,2000007,2000008 and now i want to create one inspection lot for these 3 physical sample through QPR5 Transaction but system is generating each inspection lot for each ph

  • Selecting PM order according to status in report

    hello we are writing a report in which we need to select PM orders according to several parameters, one of which is a specific User Status. I see that there are many tables containing statuses, like TJ20, TJ30, and plenty of others but I cannot find

  • Difference between SAP PM & SAP PLM

    Hi All, I wanted to know about the difference between SAP PM, SAP PLM & SAP EAM(Enterprise Asset Management) What business purpose SAP PLM serves & is SAP PLM an ECC component or separate product such as CRM/SRM ? Please anyone let me know . Thanks i

  • Master VI Timer

    I have set up an instrument control project using the producer-consumer architecture. Now I would like to implement a "Master Timer" VI that can be started, stopped, and reset using the P-C VI. Furthermore, I would like to display the seconds and min

  • Replacing u25A1 character

    Hi, How to replace this □ character in routine while loading data from source system. Regards, Pravender