UDF code getting right aligned- PI 7.1

Hi All,
I using PI 7.1, when I do right the UDF suddenly the total code is getting right aligned and even when I see the UDF in Funtion Libraries all the remaining UDF's are getting right aligned. It very difficult to debug the code, any can help how to the pretty print the code.
Regards
Shankar

Hi,
          in my Project, i am having UDF's as separate and Project specific udf's also in the drop down of the Functions in Message mapping editor.
I am able to open the UDF, but not able to open the Project specific udf, there is no edit option for that, directly we need to use in the mappings.
But my requirement is i need to use the same udf in other message mapping,
Please let me know the answer  or solution asap.
Regards,
Amruth

Similar Messages

  • Right aligned buttons in panelFormLayout footer

    ADF 11g
    Hello
    I do you get right aligned buttons in the footer of a panelFormLayout ?
    Regards
    Paul

    Paul,
    How about wrapping your buttons inside panelGroupLayout and setting halign property to right?
    Sample:
    <f:facet name="footer">
       <af:panelGroupLayout layout="horizontal" id="pgl1" halign="right">
           <af:commandButton id="button1"  ... />
           <af:commandButton id="button2"  ... />
       </af:panelGroupLayout>
    </f:facet>Sireesha
    Edited by: Sireesha Pinninti on Sep 22, 2009 3:50 AM

  • How do I right align the component af:navigationPane?

    First I should say that I use Jdeveloper Studio Edition Version 11.1.1.0.1.
    I have a template that in one place in the template contain these components
    <afh:cellFormat halign="right">
    <af:navigationPane>
    <af:commandNavigationItem/>
    <af:commandNavigationItem/>
    <af:commandNavigationItem/>
    <af:commandNavigationItem/>
    </af:navigationPane>
    </afh:cellFormat>
    I want to right align the cellformat and navigationPane which has the hint property set to bar. I have tried to set the Halign property of the cellFormat to right and if I have an outputText inside the cellformat it gets right aligned so I guess that works but I cant get the commandNavigationItems to right align inside the navigationPane. I have tried to set the the text-align:right; in the navigationPane but that doesn´t work. The only thing that seems to work is to set the width of the last cellformat but since the width of one of the commandNavigationItems varies it isnt a good solution either. Can´t right alignment be done with a navigationPane? Should I choose some other component instead? In case I could use another component instead, which component has similar functionality and can be right aligned?
    Atlantic Viking
    Edited by: Atlantic Viking on Feb 3, 2009 7:22 AM

    Hi,
    I have tried the sample for this :
    <af:panelGroupLayout id="pgl41" layout="horizontal" halign="right">
    <af:navigationPane id="np1" hint="tabs">
    <af:commandNavigationItem id="cn1" text="Test1"/>
    <af:commandNavigationItem id="cn2" text="Test2"/>
    <af:commandNavigationItem id="cn3" text="Test3"/>
    <af:commandNavigationItem id="cn4" text="Test4"/>
    </af:navigationPane>
    </af:panelGroupLayout>
    It works fine.
    Is it af:navigationPage(new tag) or af:navigationPane.

  • My Lexmark X2670 printer doesn't work right since I reinstalled the Firefox 3,6 version. I keep getting the alignment page to print over and over. Is there a problem between the two? Do I need a new printer driver? What?Daisynew66

    I had to change my hrowser to Firefox because Internet Explorer 9 doesn't work with my ancestry.com program. I can't uninstall Internet Explorer 9. I got Firefox 4 and it didn't work either. I started having problems with my printer working at all then. l was told to go to Firefox 3.x. I looked and there is no 3.x it is 3.5 or 3.6. I downloaded 3.6. Now I keep getting a alignment page and end up having to shut off my printer. I'm using way too much ink. I'm almost out with no hope of getting more ink until I get paid. I can't find anyplace that says to update a driver or that I need a plug-in or what might be I've done everything I know to do.wrong. It has new port cables. Do you have any idea what could be wrong? Do I need to uninstall the printer and reinstall it again? daisy

    I just figured out the print quality issue for my wife with her new iMac and new printer.
    She replaced both at once and she couldn't understand why her Artisan 730 was lower quality then her Epson R280 when they had the same specs.
    Turns out the newer printer had the option to connect via wifi which we used during setup.
    The driver options are completely different depending on how you connect.
    Once I connected via USB the correct options were available and the print quality was better.
    Looking at the R2400 it dies not have wifi, but while researching the problem for my wife someone esle was having an issue updating to the latest printer driver.
    If you go into the print utility from the Printer and Scanner system preference and under the general tab you should have driver 5.5.
    One user had to delete the old printer driver before Software Update loaded the newer printer driver.
    https://discussions.apple.com/message/15947486#15947486
    On my MacBook Pro (w Snow Leopard) I always had to reconnect my wifi at home when it woke up. I upgraded my router from an old Netgear to a newer N D-Link and stopped having to do that.
    I would be surprised you would have that problem with an Airport Extreme, you might check to see if there is a firmware update for it.

  • How to right align a read only numeric field in a panel form layout

    Hi, does anyone know how to right align a read only numeric field in a panel form layout? I am using: Style Class = AFFieldNumberMarker, but it only seems to work if the field is disabled. Disabling the field gives it a difference appearance that does not look right on our forms. These are calculated fields, which cannot be modified, so read only is necessary.
    I have looked online for some answers, and it seems that others are having similar issues.
    I have tried different combinations for the properties, but so far I cannot get it to work.
    Thanks
    Judy
    I am using JDEV 11.1.1.5

    Sorry for the delay in my response. Here is the code
    <af:inputText value="#{bindings.TotalAirlineCostEst.inputValue}"
    label="#{bindings.TotalAirlineCostEst.hints.label}"
    required="#{bindings.TotalAirlineCostEst.hints.mandatory}"
    columns="#{bindings.TotalAirlineCostEst.hints.displayWidth}"
    maximumLength="#{bindings.TotalAirlineCostEst.hints.precision}"
    shortDesc="#{bindings.TotalAirlineCostEst.hints.tooltip}"
    id="it20" readOnly="false"
    disabled="true"
    styleClass="AFFieldNumberMarker">
    <f:validator binding="#{bindings.TotalAirlineCostEst.validator}"/>
    <af:convertNumber groupingUsed="true"
    pattern="#{bindings.TotalAirlineCostEst.format}"
    type="number"
    maxFractionDigits="0"/>
    </af:inputText>
    thank you,
    Judy

  • Right alignment of Number Field in OAF Page

    Hi,
    I need to right align the column of the table which is of number type in OAF page. I have extended the VO of that page to add new columns. After VO extension i added the column to the page via personalization and gave the reference of view attribute name as per Extened VO. I have set the following properties for that column
    Item Sytle- Message Style Text
    Data Type- Number
    Nowrap=false
    Vertical Alignment=Middle
    View Attribute = Prior (same as Extended VO's column)
    View Instance = XXPayEmpAccrualActionInfoVO
    I need to set the value of this newly added column right align which is currently set as left align by default.
    I have tried the following links from OTN
    Re: Q: How to format number using personalization?
    Right align number field
    but while controller extension i m getting the following error-
    Message not found. Application: FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME = XXPayEmpAccrualActionInfoVO; APPLICATION_MODULE = oracle.apps.pay.selfservice.payslip.US.server.PayPayslipAM;
    The extended controller code is -
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OATableBean tableBean = (OATableBean)webBean.findIndexedChildRecursive("PayPayslip4Ss");
    tableBean.queryData(pageContext, true);
    tableBean.prepareForRendering(pageContext);
    DataObjectList aColFormat01 = tableBean.getColumnFormats() ;
    oracle.cabo.ui.data.DictionaryData ColFormat01 =(oracle.cabo.ui.data.DictionaryData)aColFormat01.getItem(pageContext.findChildIndex(tableBean, "Prior"));
    ColFormat01.put(COLUMN_DATA_FORMAT_KEY,NUMBER_FORMAT);
    Please can anyone provide me some pointer here..this is really urgent.
    Thanks in advance
    Renu
    Edited by: Renu Gupta on Jun 14, 2010 5:15 AM

    Hi Renu,
    Use the following code:
    OAMessageStyledTextBean origContSumBean = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("<FieldName>");
    if(origContSumBean!=null) {
    origContSumBean.setAttributeValue(CURRENCY_CODE,new OADataBoundValueViewObject(origContSumBean,"CurrencyCode"));
    Here CurrencyCode should be a view attribute in the VO associated to the items in the region.
    Regards
    Sumit

  • Right Aligned Float in JTable

    I am trying to insert floats in two or more cells but i don't how to right align it. I searched thru the tutorials but found some info only about right alignment of Integer type. Further i want to restrict entry of decimals i mean some cells (in a column) should accept 2 or 3 decimals.
    Is there any material to read more about this or the gurus out here can help me with their insights.
    TIA
    Shomal

    You must to have the model, like next code:
            TableColumnModel columnModel = tableView.getColumnModel();
            TableColumn colorColumn = columnModel.getColumn(0); //get the desire column
            DefaultTableCellRenderer colorColumnRenderer = new DefaultTableCellRenderer();
            colorColumnRenderer.setForeground(Color.red); //to change the color
            colorColumnRenderer.setBackground(Color.gray);
            colorColumnRenderer.setHorizontalAlignment(JLabel.RIGHT); //here you aling...
            colorColumn.setCellRenderer(colorColumnRenderer);When the cell is editing if you want the same aling also you must to define the aligned like that
    JTextField texto= new JTextField();
    texto.setHorizontalAlignment(JTextField.RIGHT);
    colorColumn.setCellEditor(new customEditor(texto));
    This works for me...

  • Tabs Won't Work Right Aligned JPanel

    Hello
    I'm tring to setup a JPanel using a style object for formating, JPanel.setLogicalStyle(styleimade);, and I haver everything working beautifuly for a left alligned panel, but when I attempt to work with tabs on a panel that is right aligned, StyleConstants.setAlignment(styleimade, ALIGN_RIGHT), I can't seem to get tabs to work at all. Using StyleConstants.setTabSet(styleimade, atabsetimade) to set the tabs. When I make my tabset it doesn't matter what I have my tabstops set to the indention doesn't change. When I set the alignment back to left, the tabs start to work.
    When I try to do a search on documentation I naturally get a huge list of tabpanels, and can't seeem to find anything on this particular subject.
    Any suggestions or links to other forums would be a huge help.
    Thank you in advance!

    Ok, I had thought it meant I need to be able to compile and execture the code.
    Here it is...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.lang.Object.*;
    import java.util.*;
    //enxtends JFrame because it is a window, Implements KeyListener, ActionListener
    //so it can accept keyed input.
    public class testGUI extends JFrame {
        //stores the device that this window is using to display itself.
        GraphicsDevice device;
        //both are used to store the height and width of the screen
        int ScreenHeight;
        int ScreenWidth;
        //create a bool to hold if the screen should be fullscreen or not
        boolean fullscreen = true;
        //create colors to hold default colors
        Color Blue;
        Color Orange;
        Color Black;
        //create text panels that will be displayed on the screen
        JTextPane TopLeft;
        StyledDocument DocTopLeft;
        //pass a graphics device so it knows which screen to take, the number of the
        //current display so it knows what to name the window, the height of the
        //current screen, and width so it can use that to set objects
        public testGUI(GraphicsDevice device, String NumberOfDisplay,
                              int WindowHeight, int WindowWidth) {
            //set the name and size of the screen.
            super("Screen " + NumberOfDisplay);
         setSize(800,600);
            //set the screenheight and width data types
            ScreenHeight = WindowHeight;
            ScreenWidth = WindowWidth;
            //start up everything is Design view
            //initComponents();
            //set the screen up
            setScreen();
            //setLocationRelativeTo nothing so the screen will center
         setLocationRelativeTo(null);
            //set the device for this window to the device passed to the class
            this.device = device;
            //when a close is initiated, exit
         setDefaultCloseOperation(EXIT_ON_CLOSE);    
            //as default show the screen
            setVisible(true);
        }//end default constructor
        public void setScreen() {
            //What happens when the X is clicked
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            //set the colors for this window
            Blue = new Color(0, 0, 204);
            Orange = new Color(244, 143, 0);
            Black = new Color(0, 0, 0);
            //change backgruond color of screen
            this.setBackground(Orange);
            this.getContentPane().setBackground(Orange);
    //....................................................Settings for TopLeft Pane
            //create the setup the panel
            TopLeft = new JTextPane();
            TopLeft.setEditable(false);
            TopLeft.setFocusable(false);
            TopLeft.setBackground(Orange);
            TopLeft.setPreferredSize(new java.awt.Dimension(((int) (ScreenWidth * .6)), ((int) (ScreenHeight * .6))));
            TopLeft.setDisabledTextColor(Black);
            //set Document to TopLeft
            DocTopLeft = TopLeft.getStyledDocument();
            //Create a list to hold tabstops
            java.util.List TabListLeft = new ArrayList();
            //create a tabstop, using the screen as a reference
            TabStop tstop = new TabStop(((int) (ScreenWidth * .25)), TabStop.ALIGN_CENTER, TabStop.LEAD_NONE);
            TabListLeft.add(tstop);
            //create another tab stop
            tstop = new TabStop(((int) (ScreenWidth * .33)), TabStop.ALIGN_CENTER, TabStop.LEAD_NONE);
            TabListLeft.add(tstop);
            //creating tab stop
            tstop = new TabStop(((int) (ScreenWidth * .41)), TabStop.ALIGN_CENTER, TabStop.LEAD_NONE);
            TabListLeft.add(tstop);
            //create a tab
            tstop = new TabStop(((int) (ScreenWidth * .49)), TabStop.ALIGN_CENTER, TabStop.LEAD_NONE);
            TabListLeft.add(tstop);       
            // Create a tab set from the tab stops that were made above
            TabStop[] TabStopsLeft = (TabStop[])TabListLeft.toArray(new TabStop[0]);
            TabSet TabsLeft = new TabSet(TabStopsLeft);
            // Add the tab set to the logical style;
            // the logical style is inherited by all paragraphs
            Style StyleTopLeft = TopLeft.getLogicalStyle();
            StyleConstants.setAlignment(StyleTopLeft, StyleConstants.ALIGN_RIGHT);
            StyleConstants.setTabSet(StyleTopLeft, TabsLeft);
            TopLeft.setLogicalStyle(StyleTopLeft);
            //add styles to document, in this case, it is just fonts formating
            addStylesToDocument(DocTopLeft);
            //insert text into the JPanels
            try{
                    //start with text pane at top left
                    DocTopLeft.insertString(TopLeft.getCaretPosition(), "Test", DocTopLeft.getStyle("titles"));
                    DocTopLeft.insertString(TopLeft.getCaretPosition(), ("\n\t" + "test\ttest\ttest"), DocTopLeft.getStyle("maintext"));
                    DocTopLeft.insertString(TopLeft.getCaretPosition(), "\n Test", DocTopLeft.getStyle("subtitles"));
                    DocTopLeft.insertString(TopLeft.getCaretPosition(), ("\t" + "test\ttest"), DocTopLeft.getStyle("maintext"));
                    }//end of try block for string insertion
            //I know I'm cheap there is no exception catch here
            //but the user doesn't edit anything so how can it be at the wrong location?!
            catch(Exception e) { }       
            //Make a layout that is based on things added to it
            GroupLayout layout = new GroupLayout(getContentPane());
            //set the layout for MenuDisplayGUI to the layout created above
            getContentPane().setLayout(layout);
            //Left and right                                    left and right
            layout.setHorizontalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createParallelGroup()
                    //create a sequential group that will hold all text boxes
                    .addGroup(layout.createSequentialGroup()
                        //create a paralle group to hold everyting on the left
                        .addGroup(layout.createParallelGroup()
                            .addComponent(TopLeft)
                            )//end of parallel group holding everything on left of screen
                        //.addContainerGap(1, Short.MAX_VALUE)
                    )//end of parallel group holding everything horizontally
            ));//close of layout.setHorizontalGroup
            //UP AND DOWN!!!                                      UP AND DOWN
            layout.setVerticalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    //create a sequential group to contain the items vertically
                    .addGroup(layout.createSequentialGroup() 
                        //create a paralle group to hold the items at the top of the screen
                        .addGroup(layout.createParallelGroup()
                            //add the item at the top left
                            .addComponent(TopLeft)
                            )//end of parallel group holding the two top items
                            //.addContainerGap(1, Short.MAX_VALUE)
                        )//end of sequential group holding everything vertically
            );//close of setVerticalGroup
            pack();
        }//end member function setScreen
        protected void addStylesToDocument(StyledDocument doc) {
            //create the defualt style that all other styles will build off of
            Style def = StyleContext.getDefaultStyleContext().
                            getStyle(StyleContext.DEFAULT_STYLE);
            //create the baseline for your style type
            Style regular = doc.addStyle("regular", def);
            StyleConstants.setFontFamily(def, "Sans");
            StyleConstants.setBold(def, true);
            //create a style used for titles, set the font
            Style titles = doc.addStyle("titles", regular);
            StyleConstants.setFontSize(titles, ((int) (ScreenWidth * .05)));
            StyleConstants.setForeground(titles, Blue);
            //create a style for subtitles
            Style subtitles = doc.addStyle("subtitles", regular);
            StyleConstants.setFontSize(subtitles, ((int) (ScreenWidth * .025)));
            //create a style for all of the rest of the text
            Style maintext = doc.addStyle("maintext", regular);
            StyleConstants.setFontSize(maintext, ((int) (ScreenHeight * .025)));
        }//end of member class addStyleToDocument   
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            pack();
        }// </editor-fold>                       
        * @param args the command line arguments
    public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    try {
                            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                    }//end try block
                    catch (Exception ex) {
                            System.out.println(ex);
                    }//end catch block
                    //get the graphics enviroment for this local computer
                    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
                    //create an array of graphics devices for all the "screen devices"
                    //in the env Graphics enviroment
              GraphicsDevice[] devices = env.getScreenDevices();
                    //create an integer for looping
                    int loop = 0;
                    //create a vector to hold multipe MenuDisplayGuis for systems
                    //that use multiple screen
                    Vector DisplayWindows;
                    DisplayWindows = new Vector();
                    //create a display mode which will later pass the height
                    //and width of the window to the MenuDisplayGUI object
                    DisplayMode DM;
                    //loop through all of the display devices on the local computer
                    //create a window for each screen
                    while( loop < devices.length ) {
                        //change the displaymode to the current display mode
                        DM = devices[loop].getDisplayMode();
                        //put a MenuDisplayGUI Window into the DisplyWindows vector
                        //for each display device that is on the computer. Pass the
                        //current iteration in this loop to the MenuDisplayGUI
                        //that is being created so it can name itself according to
                        //number, send the screen height and width to handle
                        //position of objects.
                        DisplayWindows.addElement(new testGUI(devices[loop],
                                                  String.valueOf(loop + 1),
                                                  DM.getHeight(), DM.getWidth()));
                        //iterate the loop
                        loop++;
                    }//end while loop
                }//end run block
        }//end static main
    }

  • Right alignment with SpringLayout

    I've just started playing with SpringLayout. I've been using mostly BoxLayout up to now but I thought it was time I gave an alternative a go. BoxLayout has it's own erratic sizing problems.
    Anyway I'm trying to generate a sub panel like:
    Title (centered)
    Quantity1 888
    Quantity2 99
    <Table> <PieChart>
    With the numbers against the RHS of the box
    First thing I've found is that putting a zero length Spring between the NORTH of the lable and the value doesn't work, I have to set both relative to the previous line or (mysteriously) no vertical separation happens at all.
    Here's the code that adds a lable/value pair:
        private static Component addPair(Component prev, String label, JLabel value) {
            Container c = prev.getParent();
            SpringLayout l = (SpringLayout)c.getLayout();
            JLabel nameLab  = new JLabel(label);
            c.add(nameLab);
            c.add(value);
            l.getConstraints(nameLab).setHeight(Spring.constant(12));
            l.putConstraint(SpringLayout.NORTH, nameLab, 2, SpringLayout.SOUTH, prev);
            l.putConstraint(SpringLayout.WEST, nameLab, 10, SpringLayout.WEST, c);
            l.putConstraint(SpringLayout.EAST, c, 10, SpringLayout.EAST, value);
            l.putConstraint(SpringLayout.NORTH, value, 2, SpringLayout.SOUTH, prev);
         //   l.putConstraint(SpringLayout.SOUTH, nameLab, 0, SpringLayout.SOUTH, value);
            l.putConstraint(SpringLayout.WEST, value, Spring.constant(10, 10, 500),
                    SpringLayout.EAST, nameLab);
            return nameLab;
        }prev being the label from the previous pair.
    It refuses to right align the value lable. It looks like the constraint between the EAST of the value and the EAST of the container has no effect. I've also set the alignment in the JLabels to RIGHT, which has no effect.
    If I take out the constraint between the WEST of the value and the EAST of the lable It plonks the lable and value on top of one another.
    Furthermore, though the hieght of the pie chart is set explictly by a constraint, the LayoutManager seems incapable of producing a sensible minimum height for the overall box.
    All of which makes me wonder if SpringLayout is worth persevering with or if there are just tricks and gaps I have to learn to deal with.

    I think I've cracked it. Some things they don't tell you about SpringLayout, which I found out mostly by reading the source.
    putConstraint is not symetrical. Logically
    putConstraint(SpringLayout.WEST, container, 10, SpringLayout.WEST,
    valueLab);might be expected to imply:
    putConstraint(SpringLayout.WEST, valueLab, -10,  SpringLayout.WEST,
    container);But it doesn't. Only the first object in the call is actually constrained.
    Secondly the "overconstraint" thing is very arbitary. Setting the NORTH or WEST clears the EAST or SOUTH wherease setting the EAST or SOUTH clears the height or width. Hence if you set, for example, EAST and WEST then it's essential to set EAST first, otherwise WEST will be ignored and the WEST will be set from EAST - width. There seems to be no way of clearing a constraint once set, and constraints are intialised from the objects bounds, so NORTH and WEST are always set to zero initially. If seems like the contraints are almost always going to be treated as overconstrained.
    Parallel constraints don't get combined, the last one specified predominates so there doesn't seem any sensible way of, for example, setting the width of a container based on the maximum of the widths of fields contained.
    There seems to be no use of the springiness of Spring objects. They are merely treated as min, pref and max values. Logically stretchiness should be used to distribute space, and to cope with springs in parallel. It doesn't appear any of that stuff is done.

  • Right Align Dropdown Menu

    I'm working on my mobile site and have a dropdown box on the right edge of the screen. I can't figure out how to get it so the dropdown boxes are right-aligned with the edge of the box. At the moment they are left aligned, which means the menu items disappear off the right edge of the screen. Am I missing something or is this not possible?

    Could you post your Screenshot and code.
    There is "browse" icon above POST REPLY button, it helps to add your image.

  • Right Align the Currency values in ALV report

    Hi Friends,
    I have developed a report and displayed the output using the ALV. I have columns for currency values in the output table.
    The fields for currency values are character fields. The values in the table for display, is properly right aligned (default for currency values). But in the output, the currency values are left aligned.
    Since I need blank lines in the output table after each entry, I have used the character fields in the output table so that I can clear them and append it to get the blank line.
    Please suggest me to get the currency values right aligned.
    Thanks in advance.

    try with this field in field catalog.
             just(1)        type c,        " (R)ight (L)eft (C)ent.
    for the currency field add this field too in field catalog. it will work.

  • How can I right-align a table header?

    Does anyone know a way to right-align a table header?
    For example, in the table below I want the word 'Price' to be right-aligned. I could set the table's 'header renderer' to be a right-aligned DefaultTableCellRenderer, but then the header would look like a cell, not a header. Why can't swing be simple, like table.getColumn(1).setAlignment(Column.RIGHT) ????
    public class TestTableHeader {
         public static void main(String[] args) throws Exception {
              JFrame frame = new JFrame("Test");
              Object[][] rowData = new Object[][] { { "General Electric", "$100.60" },
                        { "IBM", "$5.20" }, { "Wal-mart", "$17.00" } };
              JTable table = new JTable(rowData, new Object[] { "Name", "Price" });
              DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
              renderer.setHorizontalAlignment(DefaultTableCellRenderer.RIGHT);
              table.getColumnModel().getColumn(1).setCellRenderer(renderer);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(400, 300);
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setVisible(true);
    }

    I modified your code an came up with a solution to the problem.
    import java.awt.Component;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableCellRenderer;
    public class TestTableHeader {     
         public static void main(String[] args) throws Exception {
              JFrame frame = new JFrame("Test");
              Object[][] rowData = new Object[][] {
                        { "General Electric", "$100.60" }, { "IBM", "$5.20" },
                        { "Wal-mart", "$17.00" } };
              JTable table = new JTable(rowData, new Object[] { "Name", "Price" });
              RightAlignRender right = new TestTableHeader().new RightAlignRender();
              table.getColumnModel().getColumn(0).setHeaderRenderer(right);
              table.getColumnModel().getColumn(1).setHeaderRenderer(right);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(400, 300);
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setVisible(true);
         public class RightAlignRender extends DefaultTableCellRenderer {
              public Component getTableCellRendererComponent(JTable table,
                        Object arg1, boolean arg2, boolean arg3, int arg4, int column) {
                   Component toReturn = table.getTableHeader().getDefaultRenderer().getTableCellRendererComponent(table,
                             arg1, arg2, arg3, arg4, column);
                   switch (column) {
                   case 0:
                        ((JLabel) toReturn).setHorizontalAlignment(DefaultTableCellRenderer.CENTER);
                        break;
                   case 1:
                        ((JLabel) toReturn).setHorizontalAlignment(DefaultTableCellRenderer.RIGHT);
                        break;
                   return toReturn;
    }

  • Issue with right aligning of Character Styles in my TOC

    Hello all!
    I'm working on my very first book project and I have been reading soooo many threads on here for the past hour, but i either just don't get it, or i didn't find what i needed still, so i already apologize in case this very question has been answered before ...
    ok, so ... i am building my TOC and have set up the corresponding TOC styles to the paragraph styles used throughout the book.
    what i want is for the page number to appear before the entry. so for the page number i have set up it's own TOC page number character style.
    NOW
    the page number appears left aligned. I have checked the character styles palette and there i can't set a tab for the page number to appear right aligned ...
    how do i get this page number to be right aligned? and THEN, how do i specify the distance between the page number and the entry? there is "tab character"mentioned on the TOC dialogue box to specify the distance between page number and entry, but then do i have to go in manually every time something changes? that can't be it? i have seen in the paragraphy styles palette there is a tab section ... tried to input the tabs so the number would appear right aligned and the distance to the entry, but nothing happened, then the number is stuck right on the entry once the TOC is generated ...
    does this make any sense?
    will attach a screenshot to try to clarify the issue ...
    hope you can help me out.
    thanks a lot in advance!
    cheers
    sta-cy

    sta-cy wrote:
    sorry to have bugged you.
    Seriously, if we didn't enjoy this stuff we wouln't be here. It's not like we even get T-shirts. :-P
    An awful lot of what I know and am able to pass on comes from having spent waaaaay to much time here reading about odd problems and trying to figure out ways to solve them. I'd never seen a requst like yours until the other day, but then up pops Joel with a similar story, and what do you know, this may not be such a strange thing to want at all. Hopefully your question, and the work we put into trying to find an answer, has not only helped you, but some other users who come along next week or next year.
    Everybody starts someplace and at some point in time. There's no shame in being a beginner, and less in asking for help when you need it, especially after you put in the effort you did on your own to try to find a solution. It's also true that some folks are more design oriented and others more process oriented, and that's just the way it is. This forum has many, many, followers who are expert in different areas of InDesign (even the engineers who write the program are not experts in all the various parts) and are here to share what they know as volunteers. You are always welcome here, especially when the question is as intersting as this one.

  • Right aligned text in textfield

    Hi,
    I'm trying to set the text in a textfield to be right-aligned, as it is a number textfield. I'm trying to do this with awt only (as opposed to Swing).
    As our number system is Arabic, I figured on doing the following:
    <code>
    txtfld.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    </code>
    However, that didn't do the trick, though I'm deuced if I know why!
    Any other suggestions?
    Cheers

    DrClap wrote:
    ...Arabic numerals are the ones like 0, 1, 2, and so that are used all over the Western world...Actually, no. I always thought that, too, but I just learned that most Arabic nations use "Arabic-Indic" digits to represent numbers, not the so-called Arabic digits we use in the West (I think I'll just call those "ASCII digits" from now on). However, they are written left-to-right, not right-to-left like the rest of Arabic script. @OP, if this textfield is to contain only digits, you may want to change its internal alignment instead of its orientation. Unfortunately, I don't know how to do that with an AWT TextField.

  • Right align all numbers in table of contents

    One of the entries in my table of contents has the page number right beside the entry. The rest of the page numbers are right aligned.
    When I "Show Invisibles", an arrow is in the single space between the entry and the page number. For the remaining entries, it is in the middle of the page.
    I've tried redoing the heading on the page in question about 100 times. I cannot figure out what is different about that heading that is screwing the ToC up.
    Thanks.

    Hey
    I'm really struggling with my pages as I have created a table of contents for iWork09 but it's defaulted for the pages numbers to sit directly after the chapter rather than face the opposing side like your picture shows. I tried changing the tabs and then the text layout from left to across the page but all it does it push the numbering to the next line (for the longer titles) and push the numbers across (for the shorter named titles). I can't even get the lines to appear so that the chapter title appears, then some dots leading to the number. Any ideas?

Maybe you are looking for