How to attach a text in the center of the Ellipse using JXML ?

How to attach a text in the center of the Ellipse using JXML ? Can we use labelFor="$topEllipse" ?
<StackPane fx:controller="myfxml.ArchiveLogsController" id="Login" xmlns:fx="http://javafx.com/fxml">
<children>
<AnchorPane>
<!-- Prevent AnchorPane so that it's max = pref. This causes it to center in StackPane -->
<maxWidth><Double fx:value="-Infinity"/></maxWidth>
<maxHeight><Double fx:value="-Infinity"/></maxHeight>
<children>
<Ellipse fx:id="topEllipse" centerX="100" centerY="100" radiusX="50" radiusY="10" strokeWidth="2" stroke="#FF0000" style="-fx-fill: linear-gradient(to right, white 0%, red 100%);"/>
*<Label fx:id="ArchLogs_lb" text="My Ellipse Label" />*
</children>
<properties>
<backgroundColor>
<Color blue="1.0" green="1.0" red="1.0" />
</backgroundColor>
<elementLockSel>
<Boolean fx:value="true" />
</elementLockSel>
</properties>
</AnchorPane>
</children>
</StackPane>

I'd suggest putting the Ellipse and the Label in a StackPane.
I wonder why so many people call it JXML?
It is so strange - I guess the JXML name just seems more natural to some people, though I don't know why.
I think Greg is right and that labelFor is not what you want:
http://docs.oracle.com/javafx/2.0/api/javafx/scene/control/Label.html
"Labels also are useful in that they can have mnemonics which, if used, will send focus to the Control listed as the target of the labelFor property . . . A Label can act as a label for a different Control or Node. This is used for Mnemonics and Accelerator parsing. This allows setting of the target Node."

Similar Messages

  • How to attach a text file as an attachment to email message?

    Hello Everybody,
    I have a .csv file, in which details about emp-id, emp-name, e-expenses for Reimbursement and email address are stored.
    My application reads this .csv file, and sends a mail to each employee with his id, salary details in text format. (by changing content type to "text/plain") The code is working fine. But,
    My problem is:
    The message is sent as message body to the end user.
    The end user / the person who receives this mail will not be a technical person. So,
    1) If he trys to take a print out of this e-mail, He get only half of it.(as no. of colums will be more than paper size).
    2) I am finding alignment problem. IF employee name is too big, other columns will shift to right and data will not be exactly under column header. (it is going in zig zag way)
    So, I thought sending text file with all the details as an attachment might do well.
    But, I don't know how to attach a text file to email-message body.
    code
    try
                   {               String s1="";
                                  File f1 = new File(the path);
                                  FileInputStream fstream = new FileInputStream(f1); //new
                                  BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
                                  int count=0;
                                  while((s1=br.readLine())!=null )
                                                 count++;
                                                 //out.println("within while loop "+count);
                                                 StringTokenizer st = new StringTokenizer(s1,",");
                                                 if ((st.hasMoreTokens())&&(count>1))
                                            String a=st.nextToken().trim();
                                                 String b=st.nextToken();
                                                 String c=st.nextToken();
                                                 String d=st.nextToken();
                                                 String e=st.nextToken();
                                                 String f=st.nextToken();
                                                 String g=st.nextToken();
                                                 String h=st.nextToken();
                                                 String i=st.nextToken();
                                                 String j=st.nextToken();
                                                 String k=st.nextToken();
                                                 String l=st.nextToken();
                                                 String m=st.nextToken();
                                                 String n=st.nextToken();
                                                 String o=st.nextToken();
                                                 String p=st.nextToken();
                                                 String q=st.nextToken();
                                                 String mail=st.nextToken();
                                                 String s=st.nextToken();
                                                 //out.println("b="+b+"c="+c+"d="+d+"e="+e+"f="+f+"mail="+mail);
                                                 %>
    <%
                                            String to =mail;
                                                 String from =request.getParameter("fromadd");                                        
                                                 String subject ="Statement of Expenses";
                                                 String smtp ="mail.xxxxxxxxxx.com";
                                                 String message="";                                        
                                                 message=message.concat("EMP ID");
                                                 message=message.concat("     ");
                                                 message=message.concat("Name");
                                                 message=message.concat("          ");
                                                 message=message.concat("Dept No.");
                                                 message=message.concat("     ");
                                                 message=message.concat("Acc No.");
                                                 message=message.concat("     ");
                                                 message=message.concat("*****************************************************************************************");     
                                                 message=message.concat(a);
                                                 message=message.concat("     ");
                                                 message=message.concat(b);
                                                 message=message.concat("          ");
                                                 message=message.concat(c);
                                                 message=message.concat("     ");
                                                 message=message.concat(d);
                                                 Properties props = System.getProperties();
                                                 // Puts the SMTP server name to properties object
                                                 props.put("mail.smtp.host", smtp);
                                                 // Get the default Session using Properties Object
                                                 Session session1 = Session.getDefaultInstance(props, null);
                                                 // Create a New message
                                                 MimeMessage msg = new MimeMessage(session1);
                                                 // Set the From address
                                                 msg.setFrom(new InternetAddress(from));
                                                 // Setting the "To recipients" addresses
                                            msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
                                            /* // Setting the "cc recipients" addresses
                                            msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc, false));
                                            // Setting the "Bcc recipients" addresses
                                            msg.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc, false)); */
                                            // Sets the Subject
                                            msg.setSubject(subject);
                                            // set the meaasge in HTML format
                                            msg.setContent(message,"text/plain");
                                            // Set the Date: header
                                            msg.setSentDate(new java.util.Date());
                                            // Send the message
                                            Transport.send(msg);
                                            // Display Success message
                                            result =result.concat("<tr><td>"+b+"</td>"+"<td>"+to+"</td></tr>");
                                                      }//end of if of hasmore element
                                       }// end of while loop
                        out.println(result);                    
    }catch(Exception e)
                        // If here, then error in sending Mail. Display Error message.
                        result="Unable to send your message";
                        out.println("e="+e);
    Any help will be appreciated.
    Thanks and regards.
    Ashvini

    <html>
    <p>
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setText("Your Messages");
    MimeBodyPart mbp2 = new MimeBodyPart();
    FileDataSource fds = new FileDataSource("Your Attachments");
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setFileName(fds.getName());
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    msg.setContent(mp);
    msg.saveChanges();
    msg.writeTo(System.out);
    msg.setSubject(subject);
    Transport.send(msg);
    </p>
    <B><U>See you can add above code in your program and see the magic</U></B>
    Bye
    regards--
    Ashish
    </html>

  • How do I put page number at the center of the bottom of page one and the rest of the page numbers at top right corner?

    How do I put page number at the center of the bottom of page one and the rest of the page numbers at top right corner?

    Put a section break at the bottom of page 1
    Then insert your page number in the footer of page 1.
    Go to page 2 and click in the body of the text;
    Inspector > Layout > Section > uncheck Use Previous Headers & Footers > click in Header on page > insert > Page Number
    Peter

  • How to attach a text table to database table

    How to attach a text table to another database table,
    Ex: If we check Mara table and GoTO menu select text table it is displaying MAKT table, how to link that?

    create another table with foriegn key relation with the key field and in the check table give the primary key table and in the text table include sparas field.
    JUAT SAME AS CREATING ANOTHER TABLE WITH FORIEGN KEY RELATION but THE ANOTHER TABLE INCLUDES SPRAS (LANGUAGE KEY)
    A text table is a table that contains spoken-language descriptions of values in a check table. These descriptions are stored in multiple languages. The primary key of the text table is the same as the primary key of the check table, with the addition of a spras (language) column.
    For example, the ztxt005 table has country codes in it. Country names are stored in a separate table named ztxt005t (shown in Figure 4.7) because you actually need many names for one country code. Because it stores language-specific descriptions of a generalized code, ztxt005t is called a text table.
    The primary key of ztxt005t contains the same fields as the primary key of ztxt005, with the addition of a spras (language) column. The spras field contains the language code and enables this table to contain a description for multiple logon languages.
    The primary key of any text table is composed of the fields mandt and spras, followed by the validation field (or fields). One or more description fields follow this primary key.
    A foreign key relationship is defined on ztxt005t-land1 to check table ztxt005. The foreign key field type should be key fields of a text table.

  • How to print the JFrame In The Center Of The Page?

    hi there in the following code iam trying to print a JFrame
    but the frame appear in the printed page at the top left
    and i want it to appear in the top center of the page
    how to do that?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.print.*;
    class PrintUIWindow implements Printable, ActionListener {
        JFrame frameToPrint;
        public int print(Graphics g, PageFormat pf, int page) throws
                                                            PrinterException {
            if (page > 0) {
                return NO_SUCH_PAGE;
            Graphics2D g2d = (Graphics2D)g;
            g2d.translate(pf.getImageableX(), pf.getImageableY()-55);
            frameToPrint.print(g);
            return PAGE_EXISTS;
        public void actionPerformed(ActionEvent e) {
             PrinterJob job = PrinterJob.getPrinterJob();
             job.setPrintable(this);
             boolean ok = job.printDialog();
             if (ok) {
                 try {
                      job.print();
                 } catch (PrinterException ex) {
        public PrintUIWindow(JFrame f) {
            frameToPrint = f;
        public static void main(String args[]) {
            UIManager.put("swing.boldMetal", Boolean.FALSE);
            JFrame f = new JFrame("Print UI Example");
            f.addWindowListener(new WindowAdapter() {
               public void windowClosing(WindowEvent e) {System.exit(0);}
            JLabel label1=new JLabel("Selling Bill",JLabel.CENTER);
            JLabel label2=new JLabel("Customer Name :Mahmoud Saleh       ",JLabel.LEFT);
            JLabel label3=new JLabel("Buying Date :29/8/2008             ",JLabel.LEFT);
            JLabel label4=new JLabel("Book Buyed :Java Printing          ",JLabel.LEFT);
            JLabel label5=new JLabel("Number : 6 Copies                  ",JLabel.LEFT);
            JLabel label6=new JLabel("Total Price :600 $                 ",JLabel.LEFT);
            label1.setFont(new Font("Courier New", Font.BOLD, 13));
            label2.setFont(new Font("Courier New", Font.BOLD, 13));
            label3.setFont(new Font("Courier New", Font.BOLD, 13));
            label4.setFont(new Font("Courier New", Font.BOLD, 13));
            label5.setFont(new Font("Courier New", Font.BOLD, 13));
            label6.setFont(new Font("Courier New", Font.BOLD, 13));
            JButton printButton = new JButton("Print This Window");
            printButton.addActionListener(new PrintUIWindow(f));               
            JPanel panel=new JPanel();
            panel.setLayout(new GridLayout(6,1));
            panel.add(label1);
            panel.add(label2);
            panel.add(label3);
            panel.add(label4);
            panel.add(label5);
            panel.add(label6);
            f.setSize(300,300);       
            f.setLocationRelativeTo(null);       
            f.add(panel,BorderLayout.CENTER);
            f.add(printButton,BorderLayout.SOUTH);
            panel.setBackground(Color.WHITE);
            f.setResizable(false);
            f.setVisible(true);
    }

    First_knight wrote:
    please tell me am i thinking right
    about this method: setImageableArea(.....)
    public void setImageableArea(double x, double y,  double width, double height);
    like I said, I've tried this method and it doesn't seem to do anything.
    the width=the JFrame Width,the height=the JFrame Height right?actually, when printing, 72 points (printing version of pixels) = 1 inch, so to do WYSIWYG, you need width = JFrameWidth * 72.0 / Toolkit.getToolkit().getScreenResolution. Ditto with height
    upper left beginningx(0)---------------------------200--------------------------------600-----------------------------------y(1000)upper right beginningyou need to do something like PageSetup.getImageableX and do Graphics.translate(x,y);
    also, if your page width = 720, that = 10 inches - that's a wide page (unless its in landscape)
    so if i want the JFrame To Be In The Center Of The Page I Would Choose From x=200 ,y=600 depending that frame width is 400Actually, it would be 300 - 700 in your example
    Because when i tried to use:setImageableArea(200, 600,  400, 200);like the above code
    no changes occurs in the printed paperYes. You need to offset the Graphics object

  • My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    My MacBookPro has a white screen with a grey file folder in the center of the screen with a white question mark blinking in it. What does this mean?  And how can I get my computer back up and running normal?

    Start up in Safe Mode.
    http://support.apple.com/kb/PH14204?viewlocale=en_US
    Repair Disk.
    http://support.apple.com/kb/PH5836
    Reset PRAM.
       http://support.apple.com/kb/PH14222

  • How do I get alerts to remain in the center of the screen after unlocking my iPhone in iOS 7?

    The whole point of alerts, according to Apple, is to let you know about important events by remaining in the center of the screen until you acknowledge them. So why, when my iPhone 4s is locked and I receive an alert, does absolutely nothing appear when I unlock my phone? I use OmniFocus2 for everything, but the app isn't useful to me without forcing me to acknowledge the alerts I've set up for my to-do's. I've messed with all the notification options (like removing from lock screen), but I simply cannot believe that the only way Apple would allow their alerts to work properly is by forcing me to keep my phone from auto-locking indefinitely.
    Can anyone help?
    Jackie

    I just came from using a BlackBerry Z10 and just got a iphone 5S. I have to say that this is the most ridiculous issue i am having to deal with as well. I use a password for my lock screen and if im not constantly on my phone i will miss a text msg. theres nothing from the lock screen to show you of a missed text or etc and also i dont care that i can look at notifications pull down. that is useless for the common person who doesn't live on the phone. There's no led to help this issue another major negative for me and this issue as well. So pretty much if i dont check my phone periodically i will miss something for sure. Cant believe this phone is considered the flagship of phones, there are SIMPLE issues with iphones that many other company's have fixed YEARS ago. Seriously would a LED light really hurt that bad to put on?! Get a clue apple!
    --sorry for the rant but i have been looking everywhere online and trying many issues to fix this with no luck.

  • HOW CAN I IMPORT TEXT FROM MICROSOFT WORD TO THE WEB PAGE?

    HOW CAN I IMPORT TEXT FROM MICROSOFT WORD TO THE WEB PAGE?

    Another method is tosave your Word document as an a web page.  Then open the htm file, copy the text and paste into an HTML snippet on your web page.  Resize to show all the document and publish. It will retain the style, font and alignment of the original Word document.
    OT

  • How can I find the center of the current view

    How can I find the center of the current view

    Oracle permitted renaming the snapshot in the earlier versions of 8i. However, it does not permit renaming the materialized view in 9i or 10g.
    SQL> rename mymatview to mymatview2;
    rename mymatview to mymatview2
    ERROR at line 1:
    ORA-32318: cannot rename a materialized view
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining options
    SQL> rename mymatview to mymatview2;
    rename mymatview to mymatview2
    ERROR at line 1:
    ORA-32318: cannot rename a materialized view
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Production

  • How do I get a Dialog to appear in the center of the screen?

    How do I get a Dialog to appear in the center of the screen?

    You can get the screen size by using Dimension java.awt.Toolkit.getScreenSize().
    Once you get the Dimension, Before using API setVisible(true), You have to do the calculations to put your dialog in the center.

  • Somehow I turned off the crosshair in the center of the Liquify tool. How does one turn this on/off?

    In PS CS 6, I somehow turned off the crosshair that used to be in the center of the Liquify tool. I'd like to get it back. How does one turn this on/off?

    The newest version of GPU Liquify now obeys the Photoshop preference "Show crosshair in brush tip" under cursors. Check this on in your prefs and you should be good to go.Non-GPU mode always has the crosshairs.
    The cursor ring was also improved to be thinner and less jagged. Also the crosshair size was reduced. Red rubylith was added to see the drag changes in density on vertical drags. Enjoy.

  • I opened my brand new MacBook Pro the other day and noticed a straight green line from top to bottom near the center of the screen. What is it from and how do I get rid of it????

    I am having a problem with my brand new MacBook Pro. After opening my laptop the other day I noticed a straight green line from top to bottom near the center of the screen. What is this from and how do I get rid of it? It is most annoying. Please Help!

    "What is this from and how do I get rid of it?"
    Such symptoms bode serious hardware issues and you shouldn't think about fixing it yourself when you are still in waranty. Get to an Apple Store, like the other poster suggests.

  • How to make a Quicktime 7 video open in the center of the screen. Answered!

    I open a Quicktime video and then noticed that the video didn't open in the top left top corner of the screen, like they usually do. So I placed the video in the center of the screen and did a SAVE, then closed the video. When I the video opened again it open to where I placed the video, the center. Then I placed the video on my second screen, center. Did a save and then close the video. When I reopened the video it open on the second screen centered....................! I don't know if this happens because of my OS (10.5.8) or Quicktime 7.6.4. But it works!!! People have been asking for years how to open a Quicktime video in the center of the screen. But there hasn't been an answer or a fix on how to do this, until now...! If you do a SAVE AS you can't over write the video you need to rename the video.
    Footnote: If you do a SAVE to Quicktime video. The video will lose the FAST START feature. If you need the fast start feature you need to do a SAVE AS. SAVE AS places the fast start feature back into the video. Fast start is used for videos that are posted on the internet.
    Message was edited by: David M Brewer

    Hi there
    What version of Captivate?
    Typically there is an option to click just to the right of where you type the URL.
    Below is an image of the version 5 properties.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How do I stop Preview printing things in the center of the paper?

    Preview always insists on printing things in the center of the paper, which is handy when I'm printing, say, a paper-page document, but when I'm printing images or PDF's less than the full paper size, the result is a big waste of paper, especially when I have to print out multiple documents. The only workaround to my knowledge is to throw all my documents into Pages and arrange and print them from there, but come on—that isn't an acceptable solution. This is a problem I would expect to find in Windows. Anyone know how to change this?

    One action that you can follow is to open an image in Preview and set to show the Thumbnails. You can then drag some other images that you want to print into the Thumbnail bar. If you then select to print and with the Show Details view selected, choose the Layout menu and set the Pages Per Sheet menu to 2 or 4 or 6 (depending on the number of images you have to print) then this will print all of these images on a single page.

  • My App Store opens with a white empty box covering the center of the screen making the screen unusable.  How do I get rid of it?

    Whenever I open the App Store there is a white box covering the center of the screen making the store screen unusable.  How do I fix it?

    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...

Maybe you are looking for

  • LG Revolution missing half of text messages

    When I get multiple SMS messages on my phone everytime I look at the conversation in the messaging app the first half of the message is always missing. This occurs everytime I drag the message notification down. If I drag up to just unlock my phone o

  • Itunes for WIN7: attempting to copy to disk "..." failed.  The file name was invalid or too long

    itunes for WIN7: attempting to copy to disk "..." failed.  The file name was invalid or too long help!!

  • Mac Mini Bios and booting in Linux

    Does anyone know if the EFI /Bios issue that prevented the previous generation Mini from booting into Linux without a monitor or KVM switch attached has been remedied in the new Mini's?

  • Old chestnut ? IMAGE PAN

    Hi all - just joined the forum today and would appreciate some help from teh great the good and the wise who live here. I've used Premiere 6.0 for some time now and recently downloaded the CS3 trial. One of the features that I like most in 6 is the v

  • Minor Softwarebug iOS 4.2.1 / iTunes 10 (10.1.0.56)

    Hello, I found a minor Softwarebug in the iOS 4.2.1 /iTunes 10: (I am using iPhone 4, iTunes and Windows 7) Whenever i syncronise music on to my iPhone and this process takes very long, because e.g. i convert media in to 128 bit/sec AAC files this tw