Seting jtextfiled background color which is added in jtable

hello all,
i trying to added a jtextfield with forground color in a table.
the problem is when click the cell it shows a color after it wont.
i try use cellrender but i didt get the result.
import java.awt.Color;
import javax.swing.DefaultCellEditor;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellEditor;
public class ButtonInTable extends JFrame{
     public ButtonInTable(){
          Object[][] data =
               {"Color", "Red", new Boolean(false)},
               {"Shape", "Square", new Boolean(false)},
               {"Fruit", "Banana", new Boolean(false)},
               {"Plain", "Text", new Boolean(false)},
               {"Plain", "Text", new Boolean(false)}
          String[] columnNames = {"Type","Value","Integers"};
          DefaultTableModel model = new DefaultTableModel(data, columnNames);
          JTextField jbt = new JTextField("hello");
          final DefaultCellEditor dce = new DefaultCellEditor( jbt );
          jbt.setBackground(Color.RED);
          JTable table = new JTable(model){
               public boolean isCellEditable(int row, int col){
                    return true;
               public Class<?> getColumnClass(int col){
                    if(col == 2)
                         return Boolean.class;
                    else
                         return super.getColumnClass(col);
               public TableCellEditor getCellEditor(int row, int column){
                    if(column == 1) {
                         return (TableCellEditor) dce;
                    } else {
                         return super.getCellEditor();
          JScrollPane jsp = new JScrollPane(table);
          getContentPane().add(jsp);
          pack();
          setVisible(true);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
     public static void main(String args[]){
          new ButtonInTable();
}thanks
daya

I don't understand your question. I don't know why you think clicking on a cell will change its background color. If you want the cell to change color then your TableModel to keep information about the color of the cell and then you need a renderer to use that information to display the color. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editor]How to Use Tables for an example of this.

Similar Messages

  • How to change the Background color of a cell in JTable

    hi!
    Actually i want to change the background color of few cells in JTable
    is there any method to make this change in JTable ?
    and also is it possible to have 5 rows with single column and 5 rows with 3 columns in a single JTable

    i want to change the background color of few cells in JTableDepending on your requirements for the coloring of cells it may be easier to override the prepareRenderer() method of JTable:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=610474

  • Change the background color of a cell in JTable

    Hi all,
    How can I change the background color of individual cell in JTable. I need to construct my own TableCellRenderer or not? I'm now using the DefaultTableCellRenderer now.
    Thx

    You could create your own renderer or you could try something like:
    table = new JTable(model)
         public TableCellRenderer getCellRenderer(int row, int column)
              DefaultTableCellRenderer tcr =
               (DefaultTableCellRenderer)super.getCellRenderer(row, column);
              if (row == 1 && column == 1)
                   tcr.setBackground(Color.green);
              else
                   tcr.setBackground(Color.red);
              return tcr;
    };

  • How to set cell background color for JCheckBox renderer in JTable?

    I need to display table one row with white color and another row with customized color.
    But Boolean column cannot set color background color.
    Here is my codes.
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.TreeSet;
    public class BooleanTable extends JFrame
        Object[][] data = {{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE}};
        String[] header = {"CheckBoxes"};
        public BooleanTable()
            setDefaultCloseOperation( EXIT_ON_CLOSE );
            TableModel model = new AbstractTableModel()
                public String getColumnName(int column)
                    return header[column].toString();
                public int getRowCount()
                    return data.length;
                public int getColumnCount()
                    return header.length;
                public Class getColumnClass(int columnIndex)
                    return( data[0][columnIndex].getClass() );
                public Object getValueAt(int row, int col)
                    return data[row][col];
                public boolean isCellEditable(int row, int column)
                    return true;
                public void setValueAt(Object value, int row, int col)
                    data[row][col] = value;
                    fireTableCellUpdated(row, col);
            JTable table = new JTable(model);
            table.setDefaultRenderer( Boolean.class, new MyCellRenderer() );
            getContentPane().add( new JScrollPane( table ) );
            pack();
            setLocationRelativeTo( null );
            setVisible( true );
        public static void main( String[] a )
            try
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch( Exception e )
            new BooleanTable();
        private class MyCellRenderer extends JCheckBox implements TableCellRenderer
            public MyCellRenderer()
                super();
                setHorizontalAlignment(SwingConstants.CENTER);
            public Component getTableCellRendererComponent(JTable
                                                           table, Object value, boolean isSelected, boolean
                                                           hasFocus, int row, int column)
                if (isSelected) {
                   setForeground(Color.white);
                   setBackground(Color.black);
                } else {
                   setForeground(Color.black);
                   if (row % 2 == 0) {
                      setBackground(Color.white);
                   } else {
                      setBackground(new Color(239, 245, 217));
                setSelected( Boolean.valueOf( value.toString() ).booleanValue() );
             return this;
    }

    Instead of extending JCheckBox, extend JPanel... put a checkbox in it. (border layout center).
    Or better yet, don't extend any gui component. This keeps things very clean. Don't extend a gui component unless you have no other choice.
    private class MyCellRenderer implements TableCellRenderer {
        private JPanel    _panel = null;
        private JCheckBox _checkBox = null;
        public MyCellRenderer() {
            //  Create & configure the gui components we need
            _panel = new JPanel( new BorderLayout() );
            _checkBox = new JCheckBox();
            _checkBox.setHorizontalAlignment( SwingConstants.CENTER );
            // Layout the gui
            _panel.add( _checkBox, BorderLayout.CENTER );
        public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
            if( isSelected ) {
               _checkBox.setForeground(Color.white);
               _panel.setBackground(Color.black);
            } else {
               _checkBox.setForeground(Color.black);
               if( row % 2 == 0 ) {
                  _panel.setBackground(Color.white);
               } else {
                  _panel.setBackground(new Color(239, 245, 217));
            _checkBox.setSelected( Boolean.valueOf( value.toString() ).booleanValue() );
            return _panel;
    }

  • How to change background color to JCheckBox in a JTable?

    Dear Friends,
    I have an JTable in my application. It has four columns. First, third and fourth column contains JCheckBox (JCheckBox is created using Boolean.class), secod column contains values.
    I have to change some of the cell color where JCheckBox is present.
    Could anyone please tell me how to change the color of the cell in the JTable?
    Thanks in advance,
    Sathish kumar D

    You would use a custom renderer.
    To get better help sooner, post a SSCCE that clearly demonstrates your problem.
    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    db
    Alternative link: SSCCE
    Edited by: Darryl.Burke

  • Problem while setting background color for jsplit pane

    Hi ALL,
    i am using jsplit frame inside jframe.
    i placed jtree inside left jsplit frame.
    I am not able to set background clolr to jsplit frame.
    when i hide(jtree.setvisible(false)) jtree is shows default background color.it is not showing backgroun color which i set.

    In the below code,i am adding jtree inside jscrollpane and i am adding jscrollpane inside jsplitpane.
    whenever i am setting jtree.setvisible(false),it must show background color which is i am setting for jscrollpane .but its showing default background color.
    Please help me.
    * Demo.java
    * Created on August 19, 2008, 1:44 PM
    public class Demo extends javax.swing.JFrame {
    /** Creates new form Demo */
    public Demo() {
    initComponents();
    jTree1.setVisible(false);
    jScrollPane1.setBackground(new java.awt.Color(136, 194, 252));
    jSplitPane1.setBackground(new java.awt.Color(136, 194, 252));    }
        /** 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.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jSplitPane1 = new javax.swing.JSplitPane();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTree1 = new javax.swing.JTree();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jScrollPane1.setViewportView(jTree1);
            jSplitPane1.setLeftComponent(jScrollPane1);
            org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jSplitPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 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() {
                    new Demo().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JPanel jPanel1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JSplitPane jSplitPane1;
        private javax.swing.JTree jTree1;
        // End of variables declaration

  • Applet-Panel, background color and size problem

    I am writing an applet with simple form.
    Form is having 3 rows and 2 cols (label and textfield). Each row I want to display in different color. So I created each row with 2 separate panel (one for label and one for text field - of which I set the backgroung color).
    The total form is in one panel with grid layout (2 colmns).
    My problems are
    1)The space between label and text field (col width) can not be resized. I tried to use setSize but not giving any effect.
    2)Another problem is when I am seting the background color, the textfield is also changing the color (textfield I want to white color only). This does not have any effect on Choice
    3)The first label I wanted to use simple break but could not. I tried \n\t, \n, chr(13) + chr(10) etc but not getting any result so created separate panel.
    My code goes here:
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class test1 extends Applet{
    protected TextField refnoTextField=null, payerTextField=null, amtTextField=null;
    protected Choice typeChoice;
    public void init() {
         /* The mainPanel layouts components with BorderLayout manager
              which will hold form and button panel */
         Panel mainPanel = new Panel(new BorderLayout());
         Panel taxformPanel=new Panel(new GridLayout(3,2));
         Label l;
         //panel for tax ref no label
         Panel refnoLabelMainPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
    //here wanted to use simple line break but \n\t does not seems to work not even chr (10), chr(13)
    //so created separate panel (Payment Voucher Or \n\t Reference no.
         Panel refnoLabelPanel = new Panel(new GridLayout(2,1));
         l = new Label("Payment Voucher Or");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         refnoLabelPanel.add (l);
         l = new Label("Tax Reference No:");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         refnoLabelPanel.add (l);
         refnoLabelMainPanel.add(refnoLabelPanel);
         refnoLabelMainPanel.setBackground(Color.blue);
         //panel for tax ref no text field
         Panel refnoTextFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         refnoTextField = new TextField(20);
         refnoTextFieldPanel.add(refnoTextField);
         refnoTextFieldPanel.setBackground(Color.blue);
         //panel for tax type label
         Panel typeLabelPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         l = new Label("Tax Type:");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         typeLabelPanel.add (l);
         typeLabelPanel.setBackground(Color.yellow);
         //panel for tax type choice
         Panel typeChoicePanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         typeChoice = new Choice();
         typeChoice.add("Personal Tax");
         typeChoice.add("Income Tax");
         typeChoicePanel.add(typeChoice);
         typeChoicePanel.setBackground(Color.yellow);     
         //panel for tax payers name label
         Panel payerLabelPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         l = new Label("Tax Payer's Name:");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         payerLabelPanel.add (l);
         payerLabelPanel.setBackground(Color.blue);
         //panel for tax payer field
         Panel payerTextFieldMainPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         Panel payerTextFieldPanel = new Panel(new GridLayout(2,1));
         payerTextField = new TextField(20);
         payerTextFieldPanel.add(payerTextField);
         l = new Label(" (as per NRIC or Passport)");
    l.setFont(new Font("Helvetica", Font.BOLD,8));
         payerTextFieldPanel.add (l);
         payerTextFieldMainPanel.add(payerTextFieldPanel);
         payerTextFieldMainPanel.setBackground(Color.blue);
         taxformPanel.add(refnoLabelMainPanel);
         taxformPanel.add(refnoTextFieldPanel);
         taxformPanel.add(typeLabelPanel);
         taxformPanel.add(typeChoicePanel);
         taxformPanel.add(payerLabelPanel);
         taxformPanel.add(payerTextFieldMainPanel);
         /* buttonPanel to hold all buttons */
         Panel buttonPanel = new Panel();
         buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
         Button continueButton = new Button("Continue");
         continueButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                        continueButtonAction();
         Button clearButton = new Button("Clear");
         clearButton.addActionListener(new ActionListener()     {
              public void actionPerformed(ActionEvent e)     {
                   clearButtonAction();
         Button cancelButton = new Button("Cancel");
         cancelButton.addActionListener(new ActionListener()     {
              public void actionPerformed(ActionEvent e)     {
                   cancelButtonAction();
         buttonPanel.add(continueButton);
         buttonPanel.add(clearButton);
         buttonPanel.add(cancelButton);
         mainPanel.add("Center", taxformPanel);
         mainPanel.add("South", buttonPanel);
         add(mainPanel);
    } // public void init()     
    public void continueButtonAction() {
         MessageDialog d=new MessageDialog("Confirm","Continue? ",true, 430, 150);
         System.out.println ("Continue Button Pressed");
    }//continueButtonAction
    public void clearButtonAction()     {
         System.out.println ("Reset Button Pressed");
    }//clearButtonAction
    public void cancelButtonAction()     {
         MessageDialog d=new MessageDialog("Confirm","Cancel Button ? ",true, 430, 150);
         System.out.println ("Cancel Button Pressed");
    } // cancelButtonAction
    } // TaxPaymentApplet3
    Please help,
    manisha

    I do not want to go into detail, but there are some hints you can follow.
    I am talking about AWT, not swing, you should decide which one you will use and don't mix the two of them.
    If you want to run your applet in current browsers without requiring the java plugin, you should be aware, that most browsers support old versions of java and many convenient methods and classes are missing :-(
    So
    You can change the size of a label by putting it in a panel ( labelPanel ), whose layout is set to FlowLayout. Then you put in labelPanel another empty panel ( emptyPanel ), whose layout is set to null, and you set the width of the empty panel to whatever you want ( this is the gap between the label and the next component ), an the height to the least nonsero number possible, i.e. 1. Well, you can add to the labelPanel more components, if you wish. So, when you want a gap, use an empty panel with a fixed size.
    You cannot use line break in a label. You should place more labels in a panel instead. I am not sure if the direction of FlowLayout can be set to vertical, but very probably it can. If so, that is your solution. If not - see what other layout managers you have available, but make sure your choice belongs to java.awt ! BorderLayout allows you to use up to three labels (=> 3 lines). And if nothing fits your needs, ... write a layout manager.
    Well, hope I could help.

  • NativeWindow.stage.fullScreenSourceRect and background color

    When I create new NativeWindow with normal chrome in AIR app and use fullScreenSourceRect for fullscreen state how can I control the background color?
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html
    as the Language Reference states:
    If the aspect ratio was not matched, the stage background color, which is white by default, would show on each side instead of the green background.
    swf background color should be on the sides, but the sides are gray...?

    I don't think you can control the color that is shown when your fullscreenSourceRect does not have the same aspect ratio as the screen. The solution is to match the two aspect ratios.

  • JPanel - how to introsuce shades in the background color ?

    Hi Guys,
    I want to creat a JPanel with a background color, which is actually shades of gray color. Thus the left part of the JPanel will be dark gray, and from thereon the intensity of the gray color will be decreased more and more till be reach the right end of the JPanel where it will be really light gray.
    This is exactly the same color effect which you all can see behind the "Sun Developer Network" written at the top of all these forums.
    Can anyone help me please.
    Thanks,
    S

    Use a GradientPaint for the background. Here is an example for a text field to get you started:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=481290

  • Can you specify the background color when resizing the canvas?

    I haven't found this in the Scripting Reference.
    In the "Canvas Size…" dialog box you can specify the "Canvas Extension Color" to "Foreground", Background", "White", "Black", "Grey" or "Other…".
    Can this be scripted?
    I am writing an AppleScript to resize my canvas in order to add a slug to the bottom of the image. Currently my script stores the background color, so I can change it to White to accomplish my goal without discarding the background color (which gets restores at the end of the script). The problem is that if the user has a custom color (i.e. Pantone color) as the background color, the color does not get stored.

    See if this works for you… Just some very basic AppleScript with a call to 'do javascript' in this case the variable 'Solid_Fill' this is a cleaned up piece of scriptlistener output (done very nicely by X's tools you will see a post below to the latest release of this) The scriptlistener output has been turned into a function that javascript can call. Inside of the function call I have put a list arguments passed from AppleScript. So the values 0, 0, 0, 0 in the AppleScript list end up as arguments passed to the functions C, M, Y, K variables. AppleScript objects are 1 based Javascript are 0 based & values the same.
    set Solid_Fill to "function solidFillCMYK(C, M, Y, K) {
    function cTID(s) { return app.charIDToTypeID(s); };
    function sTID(s) { return app.stringIDToTypeID(s); };
    var desc8 = new ActionDescriptor();
    var ref4 = new ActionReference();
    ref4.putClass( sTID('contentLayer') );
    desc8.putReference( cTID('null'), ref4 );
    var desc9 = new ActionDescriptor();
    var desc10 = new ActionDescriptor();
    var desc11 = new ActionDescriptor();
    desc11.putDouble( cTID('Cyn '), C );
    desc11.putDouble( cTID('Mgnt'), M );
    desc11.putDouble( cTID('Ylw '), Y );
    desc11.putDouble( cTID('Blck'), K );
    desc10.putObject( cTID('Clr '), cTID('CMYC'), desc11 );
    desc9.putObject( cTID('Type'), sTID('solidColorLayer'), desc10 );
    desc8.putObject( cTID('Usng'), sTID('contentLayer'), desc9 );
    executeAction( cTID('Mk  '), desc8, DialogModes.NO );
    }; solidFillCMYK(arguments[0], arguments[1], arguments[2], arguments[3]);"
    tell application "Adobe Photoshop CS2"
    activate
    set User_Rulers to ruler units of settings
    set ruler units of settings to pixel units
    set Doc_Ref to the current document
    tell Doc_Ref
    set background layer of last layer to false
    do javascript Solid_Fill with arguments {0, 0, 0, 0} show debugger on runtime error
    move first layer to end
    set Doc_Height to height
    -- set Doc_Width to width did NOT need this
    resize canvas height Doc_Height + 200 anchor position top center
    flatten
    end tell
    set ruler units of settings to User_Rulers
    end tell

  • When I print an email with Windows Mail, it prints the background color. How can I change that?

    When I receive an email that has a background color, which I want to print, the background color also prints. I do not the background color to print. How do I stop this?

    See this bug report:
    *[https://bugzilla.mozilla.org/show_bug.cgi?id=683139 bug 683139] - Using the 'High Contrast Black' 'Accessibility Option' in Win XP results in the screen colours being printed.
    <i>(please do not comment in bug reports)</i>

  • How to get a layer's background color with AE SDK

    Hello,
    I am trying to get the color of the background for my current layer but I can't seem to find how to do it.
    By background color, I don't mean the application's background color, but the color that shows through if I set the alpha of my pixels to 0.
    For example, suppose the composition background is black, I put a green solid on top of it, then put an image on top of the solid and apply my pug-in to the image.
    If I set the alpha to zero in my plug-in, the solid's green will show up.
    So I want to be able to find out that my background is green.
    I already tried using PF_AppGetBgColor() but that returns the application's background color, which is not green in this example.
    If you want more details about what I want to do, I have plug-in P1 which sets some pixels to 0-alpha. On top of it I apply another plug-in P2 which reveals 0-alpha pixels by blending them with some color.
    What happens now is that the output is the original image's color blended with P2's color (because P1 only modified the pixels' alpha).
    What I want is to have the color showing through the transparent pixels of P1 blended with P2's color.
    To do that, I would like to be able to set the color of the 0-alpha pixels to the background's color in P1.
    Sorry for the long question.
    Thanks for your suggestions.

    hello nicolas.
    if i understood you correctly, what you're trying to get it the image buffer of the composited layers, beneath the layer with your effect.
    if that is correct, then i'm afraid it's next to impossible to do.
    when AE renders a composition it doesn't do it bottom to top. it tries to do the opposite actually.
    why? because if at a certain point the buffer is fully opaque, then it doesn't need to render what's beneath.
    further more, checked out layers change the order rendering, and many other things affect the rendering order of the layers.
    besides that, there's no API for accessing intermediate comp buffers. just the final result.
    the closest you can get to that without turning the world over, is to use AEGP_GetCompBGColor(),
    which would prove useless to you as the image doesn't get composited over that color, unless that's the comp being saved to file.
    so why did i say "next to impossible"?
    you can turn the world around.
    you can write an AEGP of type "artisan". (look at the "arti" sample)
    these plug-ins render comps (instead of the "advanced3D" renderer)
    an artisan does have intermediate comp results, as it is the one doing the rendering.
    so now you can have your artisan save the buffer you need, and deliver it to your effect.
    i must warn you that doing this is very very very difficult.
    another possible solution is to create a duplicate of the comp in which your effect resides,
    erase all layers who's image you don't need, and render that duplicated comp using AEGP_GetReceiptWorld().
    if you use this method, you have to supervise the original comp, and apply changes to the duplicate.
    yes, that too is difficult to do.
    you could make a change in strategy, and apply your effect on an adjustment layer instead.
    the input for the adjustment layer is the composited buffer of underlying layers.
    then you could get the original sources you wish to process using checked out layer params.
    the last solution i can think of is using the sampleImage() expression on a hidden param.
    this will give you pixel data from any layer in the comp, but not the composite of the underlying layers.
    maybe if you tried sampling an adjustment layers post effects... i don't know. you'll have to try.
    this method is very slow, and is also limited to time out, so you can't get a large number of pixels.
    the expression will simply fail.
    i hope it hasn't been all bad news for you.
    maybe of you told more about the plug-in you're developing i could come up with a better plan.

  • Background Color When Adding Frames - PSE8 or PSE9

    When adding a frame to an image, the background color that is outside of the new frame, and which borders it, always comes up white for me.  Can that area be made to come up another color, and if so, how?  Thanks!

    Hi,  I understand that, but what I really want to do, and perhaps I didn't express myself clearly, is select a background color other than white and have it come up as the default color until such time as it's changed.  Thanks!
    Date: Thu, 10 Mar 2011 06:43:04 -0700
    From: [email protected]
    To: [email protected]
    Subject: Background Color When Adding Frames - PSE8 or PSE9
    For the background, you can either choose any background from the content panel or
    choose any color from the color palette
    select Paint bucket tool
    Click on a New layer icon in the layer's panel with Control/Command pressed.
    Click on the white area around the frame.
    the area is filled with the color selected.
    >

  • Need to change the background color of a textview in offline PDF

    Hi,
    We are using the PDFDocument API in order to generate a PDF file which is eventually stored in a network folder. We were initially using the Webdynpro Interactive Form UI element, but digressed from that approach because of some architecture considerations.
    I am able to do everything with the PDFDocument API, expect two things which are proving to be much tougher than I thought:
    1) I have a textview in my .XDP template. The background color of this textview must change depending on the value that I display inside it. For example, if the value is between 1 and 20, the background color must be green, if the value is between 21 and 40, it must be yellow and so on...
    I still have not found the method to specify the background color of a textview using the .XML data file.
    2) Depending on a certain condition, I need to display 5 images in a table row instead of the usual 6. I have been able to do that by simply not providing the 6th image url, but I also need to resize the 5 such that they occupy the space that was initially used by 6 images.
    Any ideas of how I can go about these requirements?
    Thanks & regards,
    Navneet Nair.
    Edited by: Navneet Nair on Feb 19, 2009 10:09 AM

    1) I added an invisible textfield inside my .XDP file and populated it with the color value that I want my main text field to display.  (This color needs to be specified in the R,G,B format... for example... 128,0,0
    2) Now in the 'Initialize' javascript event of my main text field, I included the following script:
    this.resolveNode("<SubFormName>.<MainTextFieldName>").fillColor = this.resolveNode("<SubFormName>.<InvisibleTextFieldName>").rawValue;
    Hope it helps!
    - Navneet

  • How to set background color based on values in column grouping

    Hello,
    I have query
    select 1 as CustomerID,'Reality' as Type, 100 as Turnover
    UNION
    select 1 as CustomerID,'Budget' as Type, 120 as Turnover
    UNION
    select 2 as CustomerID,'Reality' as Type, 140 as Turnover
    UNION
    select 2 as CustomerID,'Budget' as Type, 120 as Turnover
    I have matrix, where in rows are customers, there is columngroup based on field Type and in details are summaries of Turnover. I need to change background color of Reality field, when lower than Budget. How can I do that please ?

    Hi volyn,
    After testing the issue in my own environment, we can use custom code to achieve your requirement. For more details, you can refer to the following steps:
    Copy the custom code below and paste it to your report. (Right-click report>Report Properties>Code)
    DIM PreviousValue AS Decimal
    Dim CustomerID AS String = ""
    Public Function  GetPreviousValue(byval Val as Decimal, byval CusID as string)  as Decimal
    DIM Local_PreviousValue AS Decimal
    IF CustomerID <> CusID THEN
    CustomerID  = CusID 
    PreviousValue  = val
    Local_PreviousValue  = 0
    ELSE
    Local_PreviousValue =  val - PreviousValue 
    PreviousValue  = val
    END IF
    return Local_PreviousValue 
    End function
    Click the cell which contains [Sum(Turnover)] value, modify the expression of BackgroundColor property to like this in the Properties Window: 
    =iif(Code.GetPreviousValue(Fields!Turnover.Value,Fields!CustomerID.Value)<0,"Brown","White")
    In this scenario, you can change Brown color to any color you like. The following screenshot is for your reference (I added some data to make it more clearly):
    If you have any other questions, please feel free to ask.
    Thanks, 
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Unable to open microsoft office

    I am unable to open Microsoft office at all. I restored my system yesterday and it worked. shut down and logged on today the same issue. I show that an update was done last night so I am checking here first b/f I call microsoft.

  • Why won't table of contents work in Pages

    I am creating a songbook with one song on each page.  I have about 65 pages.  I have applied the style "Heading 2" to all song titles at the top of each page.  I went into the TOC tab of the Inspector and where it says "select paragraph styles whose

  • REgarding view selection  in mm02 while using bdc

    hi, i m using function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views i

  • URL IView with parameters having no parameter identifier

    I have created a url iview but the first parameter has no Parameter Identifier after the ?. Is there a way to code for this in the URL Parameters section of the iview. Here is par to of the URL: .../Pages/ReportViewer.aspx?%2fExpress ... if it said s

  • Abap & cross applications

    hi Experts ! plz send me the links for abap & cross applications interview questions. thanks