Can draw color be changed?

Is there a way to change the color of the drawing tool to something besides red?

Yes!  To change the color of an existing Freehand drawing
Tap an existing Freehand drawing to bring up a menu.
Tap "Color..." from the menu.
Select a color from the color palette.
To change the opacity (transparency) of an existing Freehand drawing, select "Opacity..." from the menu at Step 2 above.
To change the thickness of an existing Freehand drawing, select "Thickness..." from the menu at Step 2 above.
Similarly, you can change the color, opacity, and thickness of a handwritten signature and the color and opacity of text markup annotations (highlight, strikeout, underline).
Adobe Reader will remember the color/opacity/thickness of your choice for each annotation type.
Please let us know if you have additional questions.

Similar Messages

  • Can highlight color be changed on the free version of adobe reader?

    can the highlight color be changed on the free version of adobe reader?

    You could possibly "insert" the .eps into a MS Word file (or most desktop publishing applications) and view it that way. Other than that you would need something like Adobe Illustrator to work with the file.
    Of course another option would be to use Adobe Acrobat to create a PDF of the file...

  • Can app colors be changed in iOS 7?

    Most of the core apps such as Music, Mail, Reminders, Phone, etc, have a white background with grey text, which is difficult for me to read the button text.  Is it possible to change the background color of stock apps?  If you look at the FaceTime app, it does NOT have a white background.

    It's evident that Apple does what it wants to do, and does not listen to their customers.  I bought a Moto X for $299 without a contract from Republic Wireless, and pay $30 per month for unlimited talk/text/data.  Everything is so much easier to view and read, I'm not even thinking of going back unless Apple makes some drastic changes to iOS 7.
    And it has something that has irked me about iPhones since I bought my first iPhone -- Persistant missed call/voicemail notifications!  The iPhone would remind me that I have voice mail once, that's it.  If you missed it, you would probably miss the voice mail too.  The Moto X persistanly reminds me every few minutes with an AMOLED display of an icon for missed voice mail, text messages, etc.  Untill I dismiss it!  It's configurable actually.

  • Can the color of the message app be changed on the new iOS 7 release.

    Can the new message app colors be changed?  The new format is white and quite stark.

    Appartently not!  I might as well chime in and say that the choice of a white background and sharp font is not good and needs an update.  You can invert the colors and suffer the changes to everything else but it does make the iMessage better or follow the suggestions above and increase the boldl and sharpness.

  • I just updated my MacBook Pro late 2011 15" to Mountain Lion. Whenever I open an app like VLC,Forklift,GoogleEarth,Photo Booth my color tone changes into a colder color. How can i disable this?

    Hello,
    Mountain Lion is great, but i have been facing some difficulties, first of all my apps were gone i had to reinstall all most all of them.
    That is not the big problem, the problem is that whenever i open apps like photobooth, lightroom,  or vlc my color tone changes. This is used to happen when I opened really intense apps eg mafiaII or like GTASA. Is there any way to disable this?

    try disabling it, take a took at these snaps from my phone. Might not be really clear but can give you an idea
    Hope this is clear,
    Thanks for the suppport
    Nazmul

  • How can I disable the change of color when changing background in ios7?

    how can I disable the change of color when changing background in ios7?

    For txt messages you can change the option of whether previews are shown (Settings >> Messages >> Show Preview Toggle). Switching this "Off" will still show a notification of a missed txt message, but it will not show text from the message itself.
    Unfortunately, similar functionality does not currently exist for phone calls; however, the new iOS release (scheduled for September, I think rumor has it) will revamp the way notifications are handled, and there maybe an elegant solution for you then.

  • Change to Color or Change Color - Can't figure out gradual change

    Hi, this may seem stupid, but I can't figure out how to gradually change a color to another color gradually.  The closest I get is an instant change of color in Change to Color.  I am trying to turn something pure white, I changed lighting to get a pure white, but the transition isn't a smooth one using this technique, please help a noob!  BTW I do know about clicking the clock for time-dependent changes, I simply can't get gradual.

    Using Change to Color, try to use key frames for Hue and Saturation with both near zero from the beginning and then close to 100% where the end color is to take over.

  • Why does the color red change from working with images in develop to library?  The color gets lighter and nothing shows a change on histogram but visually you can see it.

    Why does the color red change from working with images in develop to library?  The color gets lighter and nothing shows a change on histogram but visually you can see it.

    That's probably a broken display profile. The conversion from Library's Adobe RGB is different than the conversion from Develop's linear ProPhoto, so if there's a problem with the display profile it can show up this way.
    Recalibrate, or if you don't have a calibrator use sRGB. If your monitor is a wide gamut model use Adobe RGB.
    Assuming Windows, change it in Control Panel > Color Management > Devices, and relaunch Lightroom so that it can pick up the new profile at startup:

  • My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    Wow!  I think I had this same issue just last night.
    I was cleaning my macbook pro retina on the outside.  Then I opened it up and was wiping dust off the monitor and I can't pinpoint exactly when, but the colors changed suddenly.  It looked super strange, it was like green halo's and it looked worse when looking at it at an angle.  Of course I took no pictures!!!  I was freaking out that my 2 grand laptop was busted and I somehow removed a protective film or something.
    But I digress...  The image looked very green and spacey, it was almost a neat effect.  After about 5 minutes it started to look a little more digital though.  There were straight lines of this halo effect on the edges and top.  After about 10 minutes it turned into a predominate issue with the blacks on screen.  I could open a web browser and it was unnoticable on a white background.  After about 15 minutes, you could only barely see the green cloud effect if you looked at the monitor from an extreme angle.  After about 20 minutes, it was completely back to normal, I almost feel paranoid like I see a halo or something strange.  But I believe that might be all in my head now.
    So yerp, lemme know what you guys figure out.

  • Created file in illustrator then opened in photoshop but color code changed?

    I Created file in illustrator and then opened the art in photoshop but the wierd thing is that the color code changed. If you look at the image with you eye the color will look the same to the naked but if you use the eye dripper tool you can see that the color code has changed between illustrator and photoshop.
    Is there a way to make the CMYK color code stay the same?

    In Illustrator the "Edit---> color settings" are set to "North America General Purpose 2" and the that is the same color setting choice in Photoshop.
    For example there is a black color in Illustrator that has this CMYK code "60, 49,47, 100"
    but in photoshop the CMYK code for the same part of the graphic changes to "75, 68, 67, 90"
    This is only one example of many color code changes that are happening and this may look like the same color on the screen but I need them to both have the same code because I am doing specialized printing and need no changes in color codes like this to occur.
    If I have the color setting in both photoshop and illustrator both set exactly the same "Edit---> color settings" then do you know why this color shift would be happening. Please help.

  • Why don't color values change when using proof colors?

    Hi,
    i am very interested in obtaining exact replicas of the image in screen (in ProPhoto) and the image printed (using a suitable printer profile). However when I select Proof Colors from the view menu, the appearance changes but the RGBV or Lab colors remain the same. This is counter intuitive and goes against the well known recomendation to do color correcting using numbers instead of your eyes.
    What's happening? Is there a way to accomplish what I want?
    Thanks,
    Juan

    Juan,
    please let me tell you my opinion, based on working with i1Pro, ProfileMaker and a couple
    of printers and monitors:
    a) one doesn't calibrate a monitor for a better match of monitor view and print result.
    The monitor has to be calibrated for preferred settings, here for 100cd/m² and 6500K.
    In my case, calibrated in an almost dark room in order to avoid any flare, the minimal
    luminance is about 0.3cd/m², which results in a contrast of about 300. With some ambient
    light the actual contrast is probably not as large.
    b) one doesnt calibrate a printer with respect to a monitor. The printer is calibrated by
    printing a target and measuring this, followed by profile generation. As a result, a printer
    can print color patches with certain Lab values with a measurable accuracy, without any
    reference to a monitor. By the way: calibration takes the paper color into account, there-
    for one needs for each paper a new profile (as well for different printing modes or diffferent
    black inks and so on).
    What is to do?
    You have already i1 Profiler. Each version can profile monitors, but you need a version
    which can profile printers as well. In this German doc means Drucker=printer:
    http://www.pdfmarkt.de/index_de,marktcm,15,528,,49.php
    It looks as you have a version which can calibrate printers in RGB mode (perhaps i1 Basic Pro2 ).
    Then follow the procedures in these docs, mainly the third:
    http://www.northlight-images.co.uk/reviews/profiling/i1_profiler_overview.html
    http://www.northlight-images.co.uk/reviews/profiling/i1_profiler_monitor.html
    http://www.northlight-images.co.uk/reviews/profiling/i1_profiler_rgb_print.html
    What means RGB mode? Epson printers, for instance my model 7890, can be calibrated in
    RGB mode or in CMYK mode. Of course. the printer prints finally by CMYK inks, but the
    targets are defined either by RGB values or by CMYK values.
    RGB mode is preferred by photographers (RGB images), CMYK mode accepts as well CMYK
    data as generated in PostScript workflows and is used for proofing offset-print-ready PDFs.
    An example: technical graphics may contain one or two inks in order to avoid registration
    errors. Sending these data to an 'RGB-printer' would result in printing by all inks.
    I'm calibrating in CMYK mode. The profile interpretation by Profile Inspector shows CMYK
    as device space. Available profiles by others (for common papers) show RGB as device space.
    Profile connection space is in either case CIELab.
    How are the viewing conditions?
    Probably not by viewing monitor and print side by side. The monitor has 6500K, prints are
    to be inspected under 5000K. Thus, a simultaneous adaptation is impossible.
    Also, it would be wrong, because the rendering is mostly not Absolute Colorimetric.
    For the critical inspection of prints the illuminance should be very bright, 2000lx (lux),
    according to ISO.  100cd/m² is roughly equivalent to 300lx (3-hundred).
    As a result, one cannot expect a match, but an impression: looks right on the monitor, looks
    right on the print. And an offset printing press can be adjusted by matching a proof print.
    Best regards --Gernot Hoffmann

  • Why is the label color not changing when my file is updated?

    I would like the label color to change to white when a file has been updated/changed. Since upgrading to 10.7.2 the file color stays the same. Is there a setting I am missing that will allow the file to go back to white when updated?
    Thanks for any input...

    As far as I know, this is not standard functionality in the Mac OS.  Granted this, some third party application, or a script of something, was making this happen for you. Somehow the system update broke it. If you can figure out what software was giving you this feature, maybe you can update it or re-install it.
    charlie

  • Color not changing on Selected Menu tab

    I'm creating a custom css and in doing so have been trying to change the text color of the selected menu tab. I've added it to my stylesheet but it is not changing upon running it. If I change the menu tab specifically via the properties of the tab, it will change. Is 'color' something we can change?
    Here is a snipet of my css:
    .af|menuTabs::selected {color:red;
    white-space:nowrap;
    font-family:Arial,Helvetica,Geneva,sans-serif;
    font-size:200%;
    background-color:white;
    font-weight:bold;
    text-decoration:none;
    Thanks,
    Lisa

A: Color not changing on Selected Menu tab

Your '.' before af|menuTabs is wrong.
It's just "af|menuTabs::selected" not ".af|menuTabs::selected".
Also, you need to use the ::selected-link pseudo-element to style the color of the text.
/* Make the selected tab bold */
af|menuTabs::selected-link
font-weight: bold;
font-size: 14pt;
color: green;
}

Your '.' before af|menuTabs is wrong.
It's just "af|menuTabs::selected" not ".af|menuTabs::selected".
Also, you need to use the ::selected-link pseudo-element to style the color of the text.
/* Make the selected tab bold */
af|menuTabs::selected-link
font-weight: bold;
font-size: 14pt;
color: green;
}

  • Color cube changes color

    The color cube in the code below keeps changing the color of all the sides, but the top and buttom one.
    The colors should remain the same.
    Can someone explain, why the colors do change itself?
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.Frame;
    import java.awt.event.*;
    import java.awt.GraphicsConfiguration;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.geometry.ColorCube;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    //   HelloJava3Dc renders a single, rotating cube. 
    public class HelloJava3Dd3 extends Applet {
         public BranchGroup createSceneGraph() {
         // Create the root of the branch graph
         BranchGroup objRoot = new BranchGroup();
         // rotate object has composited transformation matrix
         Transform3D rotate = new Transform3D();
         Transform3D tempRotate = new Transform3D();
            rotate.rotX(Math.PI/4.0d);
         tempRotate.rotY(Math.PI/5.0d);
            rotate.mul(tempRotate);
         TransformGroup objRotate = new TransformGroup(rotate);
         // Create the transform group node and initialize it to the
         // identity.  Enable the TRANSFORM_WRITE capability so that
         // our behavior code can modify it at runtime.  Add it to the
         // root of the subgraph.
         TransformGroup objSpin = new TransformGroup();
         objSpin.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
         objRoot.addChild(objRotate);
         objRotate.addChild(objSpin);
         // Create a simple shape leaf node, add it to the scene graph.
         // ColorCube is a Convenience Utility class
         objSpin.addChild(new ColorCube(0.4));
         // Create a new Behavior object that will perform the desired
         // operation on the specified transform object and add it into
         // the scene graph.
         Transform3D yAxis = new Transform3D();
         Alpha rotationAlpha = new Alpha(-1, 4000);
         Alpha rotationBeta = new Alpha(-1, 4000);
         RotationInterpolator rotator =
             new RotationInterpolator(rotationAlpha, objSpin, yAxis,
                             0.0f, (float) Math.PI*1.0f);
         // a bounding sphere specifies a region a behavior is active
         // create a sphere centered at the origin with radius of 1
         BoundingSphere bounds = new BoundingSphere();
         rotator.setSchedulingBounds(bounds);
         objSpin.addChild(rotator);
         return objRoot;
        } // end of CreateSceneGraph method of HelloJava3Dd
        public HelloJava3Dd3() {
            setLayout(new BorderLayout());
            GraphicsConfiguration config =
               SimpleUniverse.getPreferredConfiguration();
            Canvas3D canvas3D = new Canvas3D(config);
            add("Center", canvas3D);
            BranchGroup scene = createSceneGraph();
         scene.compile();
            // SimpleUniverse is a Convenience Utility class
            SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
         // This will move the ViewPlatform back a bit so the
         // objects in the scene can be viewed.
            simpleU.getViewingPlatform().setNominalViewingTransform();
            simpleU.addBranchGraph(scene);
       } // end of HelloJava3Dd (constructor)
        //  The following allows this to be run as an application
        //  as well as an applet
        public static void main(String[] args) {
            Frame frame = new MainFrame(new HelloJava3Dd3(), 256, 256);
        } // end of main (method of HelloJava3D)
    } // end of class HelloJava3Dd

    Thanks for your reply. I need some clarification. I am in my workbook. In the BEX format toolbar I have changed the workbook to no color. Now all cells have no color. What are the steps now to change the results rows to be yellow again?  Where do I change "The Workbook results row is the Style type SAPBEXaggItem...you can change the background for thisOr steps to"
    Full points will be rewarded.

  • Can U help me change "Paint.java" to MVC model

    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollBar;
    import javax.swing.JTextField;
    import javax.swing.ImageIcon;
    public class Paint extends Applet implements ActionListener, AdjustmentListener, MouseListener, MouseMotionListener
    private static final long serialVersionUID = 1L;
    private final int NO_OP = 0;
    private final int PEN_OP = 1;
    private final int LINE_OP = 2;
    private final int ERASER_OP = 3;
    private final int CLEAR_OP = 4;
    private final int RECT_OP = 5;
    private final int OVAL_OP = 6;
    private final int FRECT_OP = 7;
    private final int FOVAL_OP = 8;
    private final int SPLINE_OP = 9;
    private final int POLY_OP = 10;
    private int mousex = 0;
    private int mousey = 0;
    private int prevx = 0;
    private int prevy = 0;
    private boolean initialPen = true;
    private boolean initialLine = true;
    private boolean initialEraser = true;
    private boolean initialRect = true;
    private boolean initialOval = true;
    private boolean initialFRect = true;
    private boolean initialFOval = true;
    private boolean initialPolygon = true;
    private boolean initialSpline = true;
    private int Orx = 0;
    private int Ory = 0;
    private int OrWidth = 0;
    private int OrHeight = 0;
    private int drawX = 0;
    private int drawY = 0;
    private int eraserLength = 5;
    private int udefRedValue = 255;
    private int udefGreenValue = 255;
    private int udefBlueValue = 255;
    private int opStatus = PEN_OP;
    private int colorStatus = 1;
    private Color mainColor = new Color(0,0,0);
    private Color xorColor = new Color(255,255,255);
    private Color statusBarColor = new Color(166,166,255);
    private Color userDefinedColor = new Color(udefRedValue,udefGreenValue,udefBlueValue);
    private JButton penButton           = new JButton(new ImageIcon(getClass().getResource("pen.gif")));
    private JButton lineButton           = new JButton(new ImageIcon(getClass().getResource("line.gif")));
    private JButton eraserButton           = new JButton(new ImageIcon(getClass().getResource("eraser.gif")));
    private JButton clearButton = new JButton("Clear");
    private JButton rectButton           = new JButton(new ImageIcon(getClass().getResource("rec.gif")));
    private JButton ovalButton           = new JButton(new ImageIcon(getClass().getResource("oval.gif")));
    private JButton fillRectButton      = new JButton(new ImageIcon(getClass().getResource("fillrec.gif")));
    private JButton fillOvalButton      = new JButton(new ImageIcon(getClass().getResource("filloval.gif")));
    private JButton splineButton = new JButton("Spline");
    private JButton polygonButton = new JButton("Polygon");
    private JButton blackButton = new JButton("Black");
    private JButton blueButton = new JButton("Blue");
    private JButton redButton = new JButton("Red");
    private JButton greenButton = new JButton("Green");
    private JButton purpleButton = new JButton("Purple");
    private JButton orangeButton = new JButton("Orange");
    private JButton pinkButton = new JButton("Pink");
    private JButton grayButton = new JButton("Gray");
    private JButton yellowButton = new JButton("Yellow");
    private JButton userDefButton = new JButton("User-Def");
    private JScrollBar redSlider = new JScrollBar(Scrollbar.HORIZONTAL, 0, 1, 0, 255);
    private JScrollBar blueSlider = new JScrollBar(Scrollbar.HORIZONTAL, 0, 1, 0, 255);
    private JScrollBar greenSlider = new JScrollBar(Scrollbar.HORIZONTAL, 0, 1, 0, 255);
    private JTextField colorStatusBar = new JTextField(20);
    private JTextField opStatusBar = new JTextField(20);
    private JTextField mouseStatusBar = new JTextField(10);
    private JTextField redValue = new JTextField(3);
    private JTextField greenValue = new JTextField(3);
    private JTextField blueValue = new JTextField(3);
    private JLabel operationLabel = new JLabel(" Tool mode:");
    private JLabel colorLabel = new JLabel(" Color mode:");
    private JLabel cursorLabel = new JLabel(" Cursor:");
    private JPanel ToolbarPanel = new JPanel(new GridLayout(11,2,0,0));
    private JPanel drawPanel = new JPanel();
    private JPanel statusPanel = new JPanel();
    private JPanel udefcolPanel = new JPanel(new GridLayout(3,3,0,0));
    private JPanel udefdemcolPanel = new JPanel();
    private JPanel PicPanel               = new JPanel();
    public void init()
    setLayout(new BorderLayout());
    ToolbarPanel.add(blackButton);
    ToolbarPanel.add(blueButton);
    ToolbarPanel.add(redButton);
    ToolbarPanel.add(greenButton);
    ToolbarPanel.add(purpleButton);
    ToolbarPanel.add(orangeButton);
    ToolbarPanel.add(pinkButton);
    ToolbarPanel.add(grayButton);
    ToolbarPanel.add(yellowButton);
    ToolbarPanel.add(userDefButton);
    blueButton.setBackground(Color.blue);
    redButton.setBackground(Color.red);
    greenButton.setBackground(Color.green);
    purpleButton.setBackground(Color.magenta);
    orangeButton.setBackground(Color.orange);
    pinkButton.setBackground(Color.pink);
    grayButton.setBackground(Color.gray);
    yellowButton.setBackground(Color.yellow);
    userDefButton.setBackground(userDefinedColor);
    ToolbarPanel.add(penButton);
    ToolbarPanel.add(lineButton);
    ToolbarPanel.add(eraserButton);
    ToolbarPanel.add(clearButton);
    ToolbarPanel.add(rectButton);
    ToolbarPanel.add(ovalButton);
    ToolbarPanel.add(fillRectButton);
    ToolbarPanel.add(fillOvalButton);
    ToolbarPanel.add(splineButton);
    ToolbarPanel.add(polygonButton);
    ToolbarPanel.setBounds(0,0,100,300);
    ToolbarPanel.add(udefcolPanel);
    ToolbarPanel.add(udefdemcolPanel);
    udefcolPanel.add(redValue);
    udefcolPanel.add(redSlider);
    udefcolPanel.add(greenValue);
    udefcolPanel.add(greenSlider);
    udefcolPanel.add(blueValue);
    udefcolPanel.add(blueSlider);
    statusPanel.add(colorLabel);
    statusPanel.add(colorStatusBar);
    statusPanel.add(operationLabel);
    statusPanel.add(opStatusBar);
    statusPanel.add(cursorLabel);
    statusPanel.add(mouseStatusBar);
    colorStatusBar.setEditable(false);
    opStatusBar.setEditable(false);
    mouseStatusBar.setEditable(false);
    statusPanel.setBackground(statusBarColor);
    ToolbarPanel.setBackground(Color.white);
    drawPanel.setBackground(Color.white);
    add(statusPanel, "North");
    add(ToolbarPanel, "West");
    add(drawPanel, "Center");
    penButton.addActionListener(this);
    lineButton.addActionListener(this);
    eraserButton.addActionListener(this);
    clearButton.addActionListener(this);
    rectButton.addActionListener(this);
    ovalButton.addActionListener(this);
    fillRectButton.addActionListener(this);
    fillOvalButton.addActionListener(this);
    splineButton.addActionListener(this);
    polygonButton.addActionListener(this);
    blackButton.addActionListener(this);
    blueButton.addActionListener(this);
    redButton.addActionListener(this);
    greenButton.addActionListener(this);
    purpleButton.addActionListener(this);
    orangeButton.addActionListener(this);
    pinkButton.addActionListener(this);
    grayButton.addActionListener(this);
    yellowButton.addActionListener(this);
    userDefButton.addActionListener(this);
    redSlider.addAdjustmentListener(this);
    blueSlider.addAdjustmentListener(this);
    greenSlider.addAdjustmentListener(this);
    drawPanel.addMouseMotionListener(this);
    drawPanel.addMouseListener(this);
    // this.addMouseListener(this);
    // this.addMouseMotionListener(this);
    updateRGBValues();
    opStatusBar.setText("Pen");
    colorStatusBar.setText("Black");
    public void actionPerformed(ActionEvent e)
         penButton.setActionCommand("Pen");
         lineButton.setActionCommand("Line");
         eraserButton.setActionCommand("Eraser");
         rectButton.setActionCommand("Rectangle");
         ovalButton.setActionCommand("Oval");
         fillRectButton.setActionCommand("Filled Rectangle");
         fillOvalButton.setActionCommand("Filled Oval");
         if (e.getActionCommand() == "Pen")
         opStatus = PEN_OP;
         else if (e.getActionCommand() == "Line")
         opStatus = LINE_OP;
         else if (e.getActionCommand() == "Eraser")
         opStatus = ERASER_OP;
         else if (e.getActionCommand() == "Clear")
         opStatus = CLEAR_OP;
         else if (e.getActionCommand() == "Rectangle")
         opStatus = RECT_OP;
         else if (e.getActionCommand() == "Oval")
         opStatus = OVAL_OP;
         else if (e.getActionCommand() == "Filled Rectangle")
         opStatus = FRECT_OP;
         else if (e.getActionCommand() == "Filled Oval")
         opStatus = FOVAL_OP;
         else if (e.getActionCommand() == "Polygon")
         opStatus = POLY_OP;
         else if (e.getActionCommand() == "Spline")
         opStatus = SPLINE_OP;
         else if (e.getActionCommand() == "Black")
         colorStatus = 1;
         else if (e.getActionCommand() == "Blue")
         colorStatus = 2;
         else if (e.getActionCommand() == "Green")
         colorStatus = 3;
         else if (e.getActionCommand() == "Red")
         colorStatus = 4;
         else if (e.getActionCommand() == "Purple")
         colorStatus = 5;
         else if (e.getActionCommand() == "Orange")
         colorStatus = 6;
         else if (e.getActionCommand() == "Pink")
         colorStatus = 7;
         else if (e.getActionCommand() == "Gray")
         colorStatus = 8;
         else if (e.getActionCommand() == "Yellow")
         colorStatus = 9;
         else if (e.getActionCommand() == "User-Def")
         colorStatus = 10;
    initialPolygon = true;
    initialSpline = true;
    switch (opStatus)
    case PEN_OP : opStatusBar.setText("Pen");
    break;
    case LINE_OP : opStatusBar.setText("Line");
    break;
    case ERASER_OP: opStatusBar.setText("Eraser");
    break;
    case CLEAR_OP : clearPanel(drawPanel);
    break;
    case RECT_OP : opStatusBar.setText("Rectangle");
    break;
    case OVAL_OP : opStatusBar.setText("Oval");
    break;
    case FRECT_OP : opStatusBar.setText("Fill-Rectangle");
    break;
    case FOVAL_OP : opStatusBar.setText("Fill-Oval");
    break;
    case POLY_OP : opStatusBar.setText("Polygon");
    break;
    case SPLINE_OP: opStatusBar.setText("Spline");
    break;
    switch (colorStatus)
    case 1: colorStatusBar.setText("Black");
    break;
    case 2: colorStatusBar.setText("Blue");
    break;
    case 3: colorStatusBar.setText("Green");
    break;
    case 4: colorStatusBar.setText("Red");
    break;
    case 5: colorStatusBar.setText("Purple");
    break;
    case 6: colorStatusBar.setText("Orange");
    break;
    case 7: colorStatusBar.setText("Pink");
    break;
    case 8: colorStatusBar.setText("Gray");
    break;
    case 9: colorStatusBar.setText("Yellow");
    break;
    case 10: colorStatusBar.setText("User Defined Color");
    break;
    setMainColor();
    updateRGBValues();
    public void adjustmentValueChanged(AdjustmentEvent e)
    updateRGBValues();
    public void clearPanel(JPanel drawPanel2)
    opStatusBar.setText("Clear");
    Graphics g = drawPanel2.getGraphics();
    g.setColor(drawPanel2.getBackground());
    g.fillRect(0,0,drawPanel2.getBounds().width,drawPanel2.getBounds().height);
    public void penOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    if (initialPen)
    setGraphicalDefaults(e);
    initialPen = false;
    g.drawLine(prevx,prevy,mousex,mousey);
    if (mouseHasMoved(e))
    mousex = e.getX();
    mousey = e.getY();
    g.drawLine(prevx,prevy,mousex,mousey);
    prevx = mousex;
    prevy = mousey;
    public void lineOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    if (initialLine)
    setGraphicalDefaults(e);
    g.setXORMode(xorColor);
    g.drawLine(Orx,Ory,mousex,mousey);
    initialLine=false;
    if (mouseHasMoved(e))
    g.setXORMode(xorColor);
    g.drawLine(Orx,Ory,mousex,mousey);
    mousex = e.getX();
    mousey = e.getY();
    g.drawLine(Orx,Ory,mousex,mousey);
    public void rectOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    if (initialRect)
    setGraphicalDefaults(e);
    initialRect = false;
    if (mouseHasMoved(e))
    g.setXORMode(drawPanel.getBackground());
    g.drawRect(drawX,drawY,OrWidth,OrHeight);
    mousex = e.getX();
    mousey = e.getY();
    setActualBoundry();
    g.drawRect(drawX,drawY,OrWidth,OrHeight);
    public void ovalOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    if (initialOval)
    setGraphicalDefaults(e);
    initialOval=false;
    if (mouseHasMoved(e))
    g.setXORMode(xorColor);
    g.drawOval(drawX,drawY,OrWidth,OrHeight);
    mousex = e.getX();
    mousey = e.getY();
    setActualBoundry();
    g.drawOval(drawX,drawY,OrWidth,OrHeight);
    public void frectOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    if (initialFRect)
    setGraphicalDefaults(e);
    initialFRect=false;
    if (mouseHasMoved(e))
    g.setXORMode(xorColor);
    g.drawRect(drawX,drawY,OrWidth-1,OrHeight-1);
    mousex = e.getX();
    mousey = e.getY();
    setActualBoundry();
    g.drawRect(drawX,drawY,OrWidth-1,OrHeight-1);
    public void fovalOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    if (initialFOval)
    setGraphicalDefaults(e);
    initialFOval = false;
    if (mouseHasMoved(e))
    g.setXORMode(xorColor);
    g.drawOval(drawX,drawY,OrWidth,OrHeight);
    mousex = e.getX();
    mousey = e.getY();
    setActualBoundry();
    g.drawOval(drawX,drawY,OrWidth,OrHeight);
    public void eraserOperation(MouseEvent e)
    Graphics g = drawPanel.getGraphics();
    if (initialEraser)
    setGraphicalDefaults(e);
    initialEraser = false;
    g.setColor(mainColor.white);
    g.fillRect(mousex-eraserLength, mousey-eraserLength,eraserLength*2,eraserLength*2);
    g.setColor(Color.black);
    g.drawRect(mousex-eraserLength,mousey-eraserLength,eraserLength*2,eraserLength*2);
    prevx = mousex;
    prevy = mousey;
    if (mouseHasMoved(e))
    g.setColor(mainColor.white);
    g.drawRect(prevx-eraserLength, prevy-eraserLength,eraserLength*2,eraserLength*2);
    mousex = e.getX();
    mousey = e.getY();
    g.setColor(mainColor.white);
    g.fillRect(mousex-eraserLength, mousey-eraserLength,eraserLength*2,eraserLength*2);
    g.setColor(Color.black);
    g.drawRect(mousex-eraserLength,mousey-eraserLength,eraserLength*2,eraserLength*2);
    prevx = mousex;
    prevy = mousey;
    public void polygonOperation(MouseEvent e)
    if (initialPolygon)
    prevx = e.getX();
    prevy = e.getY();
    initialPolygon = false;
    else
    mousex = e.getX();
    mousey = e.getY();
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    g.drawLine(prevx,prevy,mousex,mousey);
    prevx = mousex;
    prevy = mousey;
    public void splineOperation(MouseEvent e)
    if(initialSpline)
    initialSpline = false;
    public boolean mouseHasMoved(MouseEvent e)
    return (mousex != e.getX() || mousey != e.getY());
    public void setActualBoundry()
    if (mousex < Orx || mousey < Ory)
    if (mousex < Orx)
    OrWidth = Orx - mousex;
    drawX = Orx - OrWidth;
    else
    drawX = Orx;
    OrWidth = mousex - Orx;
    if (mousey < Ory)
    OrHeight = Ory - mousey;
    drawY = Ory - OrHeight;
    else
    drawY = Ory;
    OrHeight = mousey - Ory;
    else
    drawX = Orx;
    drawY = Ory;
    OrWidth = mousex - Orx;
    OrHeight = mousey - Ory;
    public void setGraphicalDefaults(MouseEvent e)
    mousex = e.getX();
    mousey = e.getY();
    prevx = e.getX();
    prevy = e.getY();
    Orx = e.getX();
    Ory = e.getY();
    drawX = e.getX();
    drawY = e.getY();
    OrWidth = 0;
    OrHeight = 0;
    public void mouseDragged(MouseEvent e)
    updateMouseCoordinates(e);
    switch (opStatus)
    case PEN_OP : penOperation(e);
    break;
    case LINE_OP : lineOperation(e);
    break;
    case RECT_OP : rectOperation(e);
    break;
    case OVAL_OP : ovalOperation(e);
    break;
    case FRECT_OP : frectOperation(e);
    break;
    case FOVAL_OP : fovalOperation(e);
    break;
    case ERASER_OP: eraserOperation(e);
    break;
    public void mouseReleased(MouseEvent e)
    updateMouseCoordinates(e);
    switch (opStatus)
    case PEN_OP : releasedPen();
    break;
    case LINE_OP : releasedLine();
    break;
    case RECT_OP : releasedRect();
    break;
    case OVAL_OP : releasedOval();
    break;
    case FRECT_OP : releasedFRect();
    break;
    case FOVAL_OP : releasedFOval();
    break;
    case ERASER_OP : releasedEraser();
    break;
    public void mouseEntered(MouseEvent e)
    updateMouseCoordinates(e);
    public void setMainColor()
    switch (colorStatus)
    case 1 : mainColor = Color.black;
    break;
    case 2: mainColor = Color.blue;
    break;
    case 3: mainColor = Color.green;
    break;
    case 4: mainColor = Color.red;
    break;
    case 5: mainColor = Color.magenta;
    break;
    case 6: mainColor = Color.orange;
    break;
    case 7: mainColor = Color.pink;
    break;
    case 8: mainColor = Color.gray;
    break;
    case 9: mainColor = Color.yellow;
    break;
    case 10: mainColor = userDefinedColor;
    break;
    public void releasedPen()
    initialPen = true;
    public void releasedLine()
    if ((Math.abs(Orx-mousex)+Math.abs(Ory-mousey)) != 0)
    // System.out.println("Line has been released....");
    initialLine = true;
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    g.drawLine(Orx,Ory,mousex,mousey);
    public void releasedEraser()
    initialEraser = true;
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor.white);
    g.drawRect(mousex-eraserLength,mousey-eraserLength,eraserLength*2,eraserLength*2);
    public void releasedRect()
    initialRect = true;
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    g.drawRect(drawX,drawY,OrWidth,OrHeight);
    public void releasedOval()
    initialOval = true;
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    g.drawOval(drawX,drawY,OrWidth,OrHeight);
    public void releasedFRect()
    initialFRect = true;
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    g.fillRect(drawX,drawY,OrWidth,OrHeight);
    public void releasedFOval()
    initialFOval = true;
    Graphics g = drawPanel.getGraphics();
    g.setColor(mainColor);
    g.fillOval(drawX,drawY,OrWidth,OrHeight);
    public void updateMouseCoordinates(MouseEvent e)
    String xCoor ="";
    String yCoor ="";
    if (e.getX() < 0) xCoor = "0";
    else
    xCoor = String.valueOf(e.getX());
    if (e.getY() < 0) xCoor = "0";
    else
    yCoor = String.valueOf(e.getY());
    mouseStatusBar.setText("x:"+xCoor+" y:"+yCoor);
    public void updateRGBValues()
    udefRedValue = redSlider.getValue();
    udefGreenValue = greenSlider.getValue();
    udefBlueValue = blueSlider.getValue();
    if (udefRedValue > 255)
    udefRedValue = 255;
    if (udefRedValue < 0 )
    udefRedValue =0;
    if (udefGreenValue > 255)
    udefGreenValue = 255;
    if (udefGreenValue < 0 )
    udefGreenValue =0;
    if (udefBlueValue > 255)
    udefBlueValue = 255;
    if (udefBlueValue < 0 )
    udefBlueValue =0;
    redValue.setText(String.valueOf(udefRedValue));
    greenValue.setText(String.valueOf(udefGreenValue));
    blueValue.setText(String.valueOf(udefBlueValue));
    userDefinedColor = new Color(udefRedValue,udefGreenValue,udefBlueValue);
    userDefButton.setBackground(userDefinedColor);
    Graphics g = udefdemcolPanel.getGraphics();
    g.setColor(userDefinedColor);
    g.fillRect(0,0,800,800);
    public void mouseClicked(MouseEvent e)
    updateMouseCoordinates(e);
    switch (opStatus)
    case 9 : splineOperation(e);
    break;
    case 10 : polygonOperation(e);
    break;
    public void mouseExited(MouseEvent e)
    updateMouseCoordinates(e);
    public void mouseMoved(MouseEvent e)
    updateMouseCoordinates(e);
    public void mousePressed(MouseEvent e)
    updateMouseCoordinates(e);
    Edited by: eclipse on Feb 19, 2008 6:29 AM

    If you can't divide the class then you can't implement an MVC design methodology.
    This class is a giant mess and can be EASILY broken down into smaller classes. Seperate the visual components into their own classes. Create Model objects that contain the data behind your visual components.
    Split up your giant ActionListener into several smaller more specialized actionlisteners and create a Controller object that you can assign these listeners and models to. Allow the event handling to be done by the controller so it can propogate necessary data changes to the models, thus altering the Views.
    Thats it in a nutshell. It is not an easy answer.

  • Maybe you are looking for