Writing Text with different orientation degrees

Hello All,
I just wanna know about writing the text vertically.
I don't mean this:
T
E
X
T
I mean as we write in MS word or other applications with orientation of 90 degrees.
Thanx in advance.

import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class TipsyText extends JPanel {
    String text = "hello world";
    Point p = new Point(200,250);
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                            RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
                            RenderingHints.VALUE_STROKE_PURE);
        g2.setPaint(Color.red);
        g2.fill(new Ellipse2D.Double(p.x-2, p.y-2, 4, 4));
        AffineTransform at = AffineTransform.getTranslateInstance(p.x,p.y);
        at.rotate(-Math.PI/2);
        g2.setFont(g2.getFont().deriveFont(28f).deriveFont(at));
        g2.setPaint(Color.black);
        g2.drawString(text, 0, 0);
    public static void main(String[] args) {
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.add(new TipsyText());
        f.setSize(400,400);
        f.setLocation(200,200);
        f.setVisible(true);
}

Similar Messages

  • Flatten/Assemble XDPs with Different orientations

    I was able to flatten XDPs into a single PDF successfully using the invokeDDX.
    The issue that I am facing now is while merging 4 forms together, if the 2nd or 3rd form happens to be in Landscape orientation, all rest of the forms also convert to the Landscape orientation. Also, when I try printing it, the Printer says the Printer Size did not match Paper type or something of that sort. Following was my DDX:
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
      <XDP result="MyXDPResult">
        <XDP source="sourceXDP1"/>
        <XDP source="sourceXDP2"/>
        <XDP source="sourceXDP3"/>
        <XDP source="sourceXDP4"/>
      </XDP>
      <?ddx-source-hint name="sourceXDP1"?>
      <?ddx-source-hint name="sourceXDP2"?>
      <?ddx-source-hint name="sourceXDP3"?>
    </DDX>
    How do I get forms with different orientations to assemble and print? Would appreciate any help in this regard.
    Thanks,
    Saurabh

    dreaming of weaving wrote:
    > Allow Tool Recording ( You used no brush type tool to be recorded and this option is only useful if all document processes are the same size and resolution.  This feature is hardly ever useful. It was poorly designed and implemented by Adobe.  Their Plug-in ScriptListener even disables this feature if you install the plug-in )
    > Create new Set
    >Create new Action
    > Click record
    > add vertical "© name" to a new layer in PS file (if you are using the text tool here and want to process different size image you have a problem here)
    > position it
    > Layer > Flatten Image, (no need to flatten you can save a layered or flat file by choosing the proper file type.)
    > File, Save, Close image. (no need to save or close if you are going to  use the image processor to batch process images.  The Image processor will open the files run your action a save the file types you set up. When all the file types have been save for a image. The Image processor will close the image and move on to the next image and repeat the process till all image files have been processed.)
    > Stop recording
    It seems you new to "Actions" .  You may fine my crafting actions package useful.  It even contains a sample watermarking action that can watermark any size document with watermarks. The Action show three methods.  Custom Text Layer,  Shape layer and Custom Loge Layer.
    Crafting Actions Package UPDATED May 2, 2014 Updates some text and added StampExif Action and Script.
    Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    More then a dozen Scripts for use in actions
    Example
    Download

  • Creating pdf-file from multiple files with different orientation

    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?

    lophelia wrote:
    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?
    First I've underline a Phrase in your Question did you mean underlying A4-format?
    Are both PDF Files created with A4-Format? If yes then:
    Did you shift orientation to Portriat Format for the item(s) that you need, such as a Chart or an excel Document? If so:
    Then when the documents are meged  They should print correctly.

  • I am having an issue writing texts with Siri on iPhone 5 iOS 6.  When I do it just talking to the phone it works fine. However if I speak through the ear pod headphones or Bluetooth headset it only writes about 5 works before trying to send.

    I am having an issue writing texts with Siri on iPhone 5 iOS 6.  When I do it just talking to the phone it works fine. However if I speak through the ear pod headphones or Bluetooth headset it only writes about 5 works before trying to send.
    Does anyone know why this might be?

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • How do I create self-writing text with overlaps?

    I've tried having a look around online and searching on here without much luck.
    I'm new to after effects and I've managed to create a basic self-writing text effect from videos online using a path and stroke technique, but there is a problem with using this technique for what I want. The text I am using has overlaps, where there are intersections, meaning that when I stroke through this area it shows chucks at the side of that line of text from the intersecting line (see below)
    I think the solution is to use a variable width stroke, where I can set the width correctly for each part of the path, but I don't seem to be able to find how to do this on CS6. I only seem to be able to define a width for the entire path at the same time

    Take a close look at this project. It's part of an upcoming tutorial on animating text and masks. Maybe the project will help. It's saved as a CC.
    Note: Dropbox will probably add a .txt extension to the file so just remove it so it just says ScriptWriteOnText_CC.aep and it should open just fine.
    The procedure was to create a text layer, then convert the text to a shape, then add a solid with stroke below the shape. I then animated the end of the Stroke with stroke set to On Transparent. I used the shape layer as a track matte to trim the stroke to the exact shape of the text converted to shape layer. I then added and animated the masks on the track matte layer. Each mask was changed to subtract and as I scrubbed through the timeline I added as many masks as I needed to clean up the crossing lines.
    There are many ways to do this. You could split the layer at the cross over, work the other way around, use Paint, but the idea is always the same and it's tedious, especially if there are a lot of crossing points. You could even create your text layers in Illustrator, convert the text to outlines, then divide up the segments of the letters and sequence them in After Effects.
    The faster you make the animation the easier it is to hide the crossing problems. For example, it only takes me about 3 seconds to sign my full name and with a signature that is that fast you could get away with a lot.

  • LR3 : Presentation module : how to create different text with different slides in 1 slideshow

    I want to make a slideshow from my holiday pictures.  I want to put a text box with the name of the place of the slide.  That means different text boxes for different slides.  I just cannot figure it out how I can manage that.  If I put a text box than it appears on al the slides.  If a just select several pictures of the whole load and add text, it still is shown on all the pictures of the slide show.
    Anyone knows what I can do ? Thanks for the help

    You have to assign the text to the different pictures in metadata fields (caption, title, ...) of the pictures themselves (best done in Library module). Then, add a text box in your slide show, not using "Custom Text" but the metadata field you've filled the information in. You can even use the text template editor (by choosing "edit ...") to select different metadata fields than the ones presented in the list.
    Beat Gossweiler
    Switzerland

  • How to monitor kids text with different ID

    I created a different ID for my child but still want to monitor his texts till he's mature enough. How do i do that

    hi nagendre.
    check it might help u.
    ****************/Tutorials/ALV/Subtotals/text.htm
    thanks n regards
    Sachin

  • Writing text with NXT icon

    Hi
    Using LabView 2010 I tried to write text in certain x,y position and not in line. I could not find an equivalent Icon to do the job, Needed to use the NXT_DisplayText from the remote vi library (see attached picture)
    The Vis from the remote library cannot be connected to the new NXT icon vi's  (Why?) and when i tried to link the sequence flow out from such a vi to the new vi i get an error message.
    Questions:
    how can I use the new NXT Icons to do the job?
    was I right to select the remote library vi?
    what should i do if i want to control the flow sequence usingboth types of vi's
    attached is a description of a program I wrote in which i had this problem
    Thanks
    Moshe
    Attachments:
    Radar Project in Lab View.pdf ‏382 KB

    Hi Tanya 
    Thank you for your reply.
    Although I posted this call for help, I have continued to search for the solution myself and finally I found that there is a vi to write to certain XY  location but that vi was not presented in the default NXT functions pallet ,nor was it clear to me that such vi exists. I have found it in the dual mode vi library C:\Program Files\National Instruments\LabVIEW 2010\vi.lib\NXT\Dual Mode Library and attached it also to the tools.
    Now I did not need to use old remote vi s so it is OK now I attach the program I wrote and if you find this example usefull for showing others, you can use it.
    Regards
    Moshe Epshtain
    Attachments:
    Radar Project in Lab View.pdf ‏393 KB
    Radar2.vi ‏30 KB

  • Indesign cs3. it prints pages out with different orientation

    hi. hope you can help.
    i set up a new document with 20 pages. when i print the first page or whatever page i want to print from prints as a landscape but the pages after are portrait or vice versa. i've used indesign for years but its happened to a couple of documents but dont know why. none of the pages are facing pages etc.
    any ideas why it happening?
    thanks in advance.
    ii

    Hi, we are getting the same thing here. Have you had any feedback or a resolution to this issue? iiod, maybe we can pool resources and troubleshoot together, full specs can be posted if needed (don't have them handy right now).

  • Unable to send mail with different fonts and colors

    Hi All,
    here is the explanation for my problem:
    I am sending mail using javamail. when i send the text with different font and color its not received in the same way. it is simply sending as plain text.
    Please help me on this issue.
    Thanks
    NG

    Hello,
    I am trying to develop an email application. It consists on sending email from [email protected] to [email protected]
    How can I do this in java ?
    I am using this software but it works only with gmail !!
             * Send Email to the webmaster
             String  d_email = "[email protected]",
                     d_host = "smtp.gmail.com",
                     d_port  = "465",
                     m_to = "[email protected]",
                     m_subject = "Email from user";
             Properties props = new Properties();
             props.put("mail.smtp.user", d_email);
             props.put("mail.smtp.host", d_host);
             props.put("mail.smtp.port", d_port);
             props.put("mail.smtp.starttls.enable","true");
             props.put("mail.smtp.auth", "true");
             props.put("mail.smtp.debug", "true");
             props.put("mail.smtp.socketFactory.port", d_port);
             props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
             props.put("mail.smtp.socketFactory.fallback", "false");
             SecurityManager security = System.getSecurityManager();
             try
                Authenticator auth = new SMTPAuthenticator();
                Session session = Session.getInstance(props, auth);
                //session.setDebug(true);
                MimeMessage msg = new MimeMessage(session);
                msg.setText("This is a message from: "+UserEmail+"\n "+UserMessage);
                msg.setSubject(m_subject);
                msg.setFrom(new InternetAddress(d_email));
                msg.setSentDate(new Date());
                msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                Transport.send(msg);
             catch (Exception ex)
                ex.printStackTrace();
                out.println("Messaging ERROR: " + ex);
                out.println(stack2string(ex));
                    if(ex.getMessage().compareTo("")!=0)
                        check = "Message NOT SENT " + ex.getMessage();
        private class SMTPAuthenticator extends javax.mail.Authenticator
            public PasswordAuthentication getPasswordAuthentication()
                return
    new PasswordAuthentication("[email protected]", "pwd");
        }please advice

  • Searching with different character sets

    Hello,
    we have a problem with Intermedia 8.1.6. running on Solaris.
    The table contains the text with different character sets and that's the problem. User submits the query in his char.set and the IM sometimes doesn't find the data.
    Idea is to create the index using the flat ascii chars and to search in ascii ... but how?
    Can anybody help me?
    Thanks.
    Zozzi
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Zozzi ([email protected]):
    sorry, wrong email in the prev msg ...
    this one is correct<HR></BLOCKQUOTE>
    Hello,
    Did you solve it ?
    If yes, how to do it. I am interested in knowing it.
    Many Thanks
    null

  • Can I Turn off iMessage in a group text with multiple people with different devices? There's 1 person in the group text that doesn't use iPhone anymore and they can't see any messages that are sent unless we send as regular text individually.

    Is there a way to turn off iMessage for a group text that includes multiple people with different non-apple devices? When a message is sent, only the iPhone users can see the iMessage. Those without them cannot see the texts unless we send individual Text Messages or turn off iMessage completely.

    now I have this and it still doesn't work.
    Section "ServerLayout"
    Identifier "Simple Layout"
    Screen "Screen 1" 0 0
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Touchpad" "SendCoreEvents"
    InputDevice "Keyboard1" "CoreKeyboard"
    Option "OffTime" "1"
    EndSection
    Section "ServerFlags"
    Option "AutoAddDevices" "False"
    Option "DontZap" "false"
    EndSection

  • Multiple copies in Adobe form with different header text

    Hi All,
    I have created Adobe form for Invoice and now my requirement is when we create an invoice it should generate 4 copies with different texts like original copy, duplicate copy and triplicate copy.
    I know its possible in samrtforms using the copy window and maintaing text there.Is it possible in adobe form , if yes how can we achieve this.
    Regards
    Lalit

    Are you using a custom driver program?
    If yes, then loop the function module with the number of copies you have.
    the copy name should be a variable which should be passed to the form in the loop change the value of the copy control accordingly.
    Please let me know, if you see any issues.
    Thanks,
    Rakesh

  • Display of text of different rows with different color - JTable

    Hi all !
    I have struck in a problem. I have to display the different rows with different color in the JTable. I have created an arraylist in the model class, which stores color of all the rows. Now in renderer class, I am just picking up color from the arraylist, taking rowIndex as index for arraylist. I used to set foreground color for each row in the renderer class. The problem is that it is not showing all the rows properly, sometimes it show all the rows correctly, but as i resize the window/panel, it starts behaving abnormally, some text is painted properly, but other aren't.
    Does anybody have any solution regarding this problem.
    One thing i want to mention is that in getTableCellRendererComponent() method, i used to retrive the color everytime, and setting the foreground color of the text. Is this a right approach or some other technique have to be followed.
    here is code of renderer class ---
    import java.awt.*;
    import javax.swing.*;
    * Renderer to plot stage record table.
    public class ExStageCellRenderer extends javax.swing.table.DefaultTableCellRenderer
        Color curColor;
         * returns component to be painted, overridding this method from
         * DefaultCellRenderer
         * @param table
         *            table whose component has to be plotted
         * @param value
         *            value of that particular cell
         * @param isSelected
         *            is Cell selected
         * @param hasFocus
         *            has the cell got focus
         * @param row
         *            row of the cell
         * @param column
         *            column of the cell
         * @return painted component
        public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row,
                int column)
            Component component = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column);
            ExStageDataModel model = (ExStageDataModel)table.getModel ();       
            if (curColor instanceof Color) {
                    curColor = model.getColor(row);
                } else {
                    // If color unknown, use table's foreground color
                    curColor = table.getForeground();
            String tooltip = "";
            StringBuffer stringBuffer = new StringBuffer ();
            for (int i = 0; i < table.getColumnCount (); i++)
                    Object Value = table.getValueAt (row, i);
                    if (Value == null) continue;
                    stringBuffer.append (Value.toString () + "    ");
            tooltip += stringBuffer.toString ();
            tooltip = tooltip.trim ();
            ((JComponent) component).setToolTipText (tooltip);
            if (column == 1)
                this.setHorizontalAlignment (SwingConstants.CENTER);
            else if (column == 0 || column == 4 || column == 5)
                this.setHorizontalAlignment (SwingConstants.LEFT);
            else
                this.setHorizontalAlignment (SwingConstants.RIGHT);
            // LOOK!! should turn tip off if there is none !!
            component.setForeground (this.curColor);
            //System.out.println("render : " + component.getBounds ());
            //component.validate ();
            component.update (component.getGraphics ());
            return component;
    Waiting for reply....
    Code snooker

    Hmm, why are you doing the curColor instanceof? What does this accomplish? I don't see any reason to ask what it was before; all you should be interested in here is what you want it to be now.
    All you should have to do is say:
    this.setForeground(model.getColor(row));I also don't see why you're doing the update() -- JTable is going to do that for you at the appropriate time, you have no idea if now is the right time to do it or not. In fact it probably isn't, you're probably updating the previously-drawn cell with your new color and alignment, which may be the strange behavior you're seeing.
    Also, I don't see why you're doing the super. All that's going to do is return "this", so why not just use "this"?
    Well, without knowing your larger code or exactly what you're trying to accomplish, maybe I'm just missing something.
    I've just recently been working on a program where I had some similar requirements -- different foreground and background colors and alignment -- and I found it much cleaner to create a class to hold all this data, and then create a default renderer for that class. Then I made some constructors for this "attribute" class that let me set whatever I need, like
    public CellAttrib(String s,Color c,int alignment,Border border)
      this.s=s;
      this.c=c;
      this.border=border;
    // with suitable defaults ...
    pubic CellAtrtrib(String s)
      this.s=s;
      this.c=Color.BLACK;
      this.border=null;
    }Then the renderer just queried the cell-attributes class, as in:
    setForeground(value.getColor());
    setHorizontalAlignment(value.getAlignment());
    setBorder(value.getBorder);

  • Hi Have problems with Firefox Aurora in terms of strange links in the text on different pages you visit. This occurs only on Firefox, not on other type internet

    Hi Have problems with Firefox Aurora in terms of strange links in the text on different pages you visit. This occurs only on Firefox, not on other type internet explorer. What could be wrong? Thorbjorn

    Do a malware check with some malware scanning programs on the Windows computer.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.microsoft.com/security/scanner/en-us/default.aspx - Microsoft Safety Scanner
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    You can also do a check for a rootkit infection with TDSSKiller.
    *http://support.kaspersky.com/viruses/solutions?qid=208280684
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

Maybe you are looking for

  • Repaint a JEditorPane after inserting data in the Document

    Hi, I have a button that inserts some text in a Document using the method insert(int offset, ElementSpec[] data)After that insert, the View recalculates the heights of the text lines, but they don't get refreshed on the JEditorPane. I have to manuall

  • How do I get variable selections in output when I send the output to Export

    Hi Friends, I am working in Web Analyzer and I would like to export the values of the variable selection to excel along with the output for future reference to know this data belongs to mentioned variable selections. Is there any setting in BI to get

  • MacBook wake-up problems

    OK I'm a PC person so I don't know a lot about MacBooks but I've been helping an older lady with one that she got maybe a month or 2 ago at the most. It's had this problem ever since she got it and other then a software update to the o/s and printer

  • IPad3 screen freezing & apps not working: Settings, Reminders & Calendar

    Updated my ipad3 to ios 6 this weekend. Experiencing several issues with the screen freezing in Settings, Reminders & Calendar. Tried to reboot, backup and restore with iTunes, but no changes. The Calendar and Reminders are still not working. Any ide

  • IWeb won't publish anymore

    All my menu items are greyed out, my publish button is greyed out. If I try to close the programme, I am warned that iWeb is still publishing, It's now had about 20 hours to publish the same site it once did in 1 hour. Is iWeb now useless to me?