Copy graphics class??

I have an Image that I draw on using the graphics library and
the possible drawing commands available (SetLineStyle, MoveTo,
LineTo, CurveTo, BeginFill, etc). Is there a way to use that
object, including what I drew on it, for a drag proxy so I see the
drawn image during a drag? Basically, I want a copy of the graphics
class.
Any help would be appreciated!!!

Check out Andrew Trice's blog on using the Bitmap API:
http://www.cynergysystems.com/blogs/page/andrewtrice?entry=flex_2_bitmapdata_tricks_and
He describes a number of potential uses (with code and
examples); though he doesn't actually talk about using it for a
drag proxy, it seems like it might be a step in the right
direction.
HTH,
Chris

Similar Messages

  • Return an Image from a subclass to a graphics class

    Hello
    I'm wondering how to return an Image generated by one class to a class which works as a graphics class. The graphics class is run from a main class. Let me make up a schedule:
    Image-generator return Image -> graphics class paint
    I have tried just making an Image and using the getGraphics to connect a graphics object to it, but it doesn't seem to work.
    Thanks in advance

    Okay, here are the pieces of code we use. (Comments are in Swedish but they are barely relevant, and explain merely basically what is happening in the program)
    The applet is compilable, but there is a nullpointerexception in Elefanträknaren, at getGraphics(). Believe me, I have tried finding the solution to this already.
    Spelet (main method)
    import java.applet.*;
    import java.awt.*;
    public class Spelet extends Applet
         /*Elefanträknaren testerna;*/
         Ritaren ritarN;
         Graphics g;
         public void init()
              /*testerna = new Elefanträknaren();*/
              ritarN = new Ritaren(g, getSize().width, getSize().height);
              setLayout(new GridLayout(1, 1));
              add(ritarN);
         public void start()
              ritarN.startaTråd();
         public void stop()
              ritarN.stoppaTråd();
         public void update(Graphics g)
              paint(g);
    }Ritaren (graphics object)
    import java.awt.*;
    public class Ritaren extends Panel implements Runnable
         Elefanträknaren e;
         Graphics g;
         int bredd, höjd;
         //Trådobjekt
         Thread tråd;
         public Ritaren(Graphics g, int bredd, int höjd)
              this.bredd = bredd;
              this.höjd = höjd;
              e = new Elefanträknaren(bredd, höjd);
         public void startaTråd()
              if( tråd == null )
                   tråd = new Thread(this); //Skapa tråden
                   tråd.start(); //Kör igång
                   e.startaTråd();
         public void stoppaTråd()
              if( tråd != null )
                   tråd.interrupt();
                   tråd = null;
         public void paint(Graphics g)
              g.drawImage(e.getSpökbilden(), 0, 0, this);
         public void update(Graphics g)
              paint(g);
         public void run()
              while( tråd != null )
                   repaint();
                   try
                        Thread.sleep(33);
                   catch(Exception e){}
    }Elefanträknaren (class generating the Image)
    import java.awt.*;
    import java.util.*;
    import java.awt.image.BufferedImage;
    import javax.swing.ImageIcon;
    public class Elefanträknaren extends Panel implements Runnable
         //Vektorn som innehåller alla Elefant-klasser
         private Vector elefanterna;
         //Ritobjektet för den dubbelbuffrade bilden
         private Graphics gx;
         //Bildobjektet för dubbelbuffringen
         private Image spökbilden;
         private int bredd, höjd;
         //Trådvariabeln
         private Thread tråd;
         //Rörelsen uppdateras 30 ggr/s. RÄKNARE håller koll på när en elefant ska läggas till (efter 30 st 30-delar = 1 ggr/s)
         int RÄKNARE = 30;
         int ÄNDRING = RÄKNARE;
         //DELAY betecknar delayen mellan två bilder/frames. 33 ms delay = 30 FPS
         int DELAY = 33;
         //Konstruktor
         public Elefanträknaren(int bredd, int höjd)
              elefanterna = new Vector();
              this.bredd = bredd;
              this.höjd = höjd;
         //Kör igång tråden/ge elefanterna liv
         public void startaTråd()
              if( tråd == null )
                   tråd = new Thread(this); //Skapa tråden
                   tråd.start(); //Kör igång
                   //Dubbelbuffringen initieras - detta måste ligga i startaTråd()
                   //spökbilden = new BufferedImage(bredd, höjd, BufferedImage.TYPE_INT_ARGB);
                   spökbilden = createImage(bredd, höjd);
                   gx = spökbilden.getGraphics();
         //Stoppa tråden/döda elefanterna
         public void stoppaTråd()
              if( tråd != null )
                   tråd.interrupt();
                   tråd = null;
         //Lägg till en elefant i vektorn
         private void läggTillElefant(Elefant e)
              elefanterna.add(e); //Lägg till en Elefant som objekt i vektorn
              Elefant temp = (Elefant)     elefanterna.get(elefanterna.size()-1);
              temp.startaTråd(); //Starta Elefantens tråd - ge Elefanten liv
         //Sätter ihop bilden som ska sickas till Ritaren
         public void uppdaterarN()
              //Rensa skärmen från den förra bilden
              gx.fillRect(0, 0, bredd, höjd);
              for( int i = 0; i < elefanterna.size(); i++ )
                   Elefant temp = (Elefant) elefanterna.get(i);
                   gx.drawImage(temp.getBild(), temp.getX(), temp.getY(), null);
         public Image getSpökbilden()
              return spökbilden;
         //Tråd-loopen
         public void run()
              while( tråd != null )
                   RÄKNARE++;
                   if( RÄKNARE >= ÄNDRING )
                        läggTillElefant(new Elefant(11, 50, 900));
                        RÄKNARE = 0;
                   uppdaterarN();
                   //repaint();
                   try
                        Thread.sleep(DELAY);
                   catch(Exception e){}
    }Elefant (a class which Elefanträknaren turns into an Image:
    import java.awt.*;
    import java.util.*;
    import javax.swing.ImageIcon;
    public class Elefant extends Panel implements Runnable
         private int x, y; //Elefantens koordinater
         private int hälsa; //Elefantens hälsa
         private int RÖRELSESTEG = 10;//Antal pixlar elefanten ska röra sig i sidled
         private int DELAY;
         //Animation
         private Vector bilderna = new Vector();
         private Vector bilderna2 = new Vector();
         private int fas; //Delen av animationen som ska visas
         private boolean framåt;
         //Tråddelen
         private Thread tråd;
         public Elefant(int x, int y, int hastighet)
              this.x = x;
              this.y = y;
              DELAY = 1000 - hastighet;
              hälsa = 100;
              framåt = true;
              fas = 0; //Nollställ fasen
              //Få fram bildernas namn
              for( int i = 0; i <= 5; i++ )
                   Image temp = new ImageIcon("Z:\\Projektet\\gamal\\Projektet\\Mappen\\mediat\\png\\jumbo" + i + ".png").getImage();
                   bilderna.add(temp);
                   Image temp2 = new ImageIcon("Z:\\Projektet\\gamal\\Projektet\\Mappen\\mediat\\png\\jumbo" + i + "r.png").getImage();
                   bilderna2.add(temp2);
         //get-variabler
         public int getX() { return x; }
         public int getY() { return y; }
         //Kör igång tråden/ge elefanten liv
         public void startaTråd()
              if( tråd == null )
                   tråd = new Thread(this); //Skapa tråden
                   tråd.start(); //Kör igång
         //Rör elefanten i sidled
         private void rörelse()
              //Animering
              if( fas < 5 ) fas++;
              else     fas = 0;
              //Flytta ner elefanten när den når en av spelets kanter
              if( x >= 800 || x <= 10 ) y += 85;
              //Kontrollera riktning
              if( x >= 800 ) framåt = false;
              else if( x <= 10 ) framåt = true;
              //Positionering
              if( framåt ) x += RÖRELSESTEG;
              else x -= RÖRELSESTEG;
         //Hämtar den aktuella bilden, och returnerar den
         public Image getBild()
              Image temp;
              if( framåt ) temp = (Image) bilderna.get(fas);
              else temp = (Image) bilderna2.get(fas);
              return temp;
         /* Tråd-hantering */
         //Stoppa tråden/döda elefanten
         public void stoppaTråd()
              if( tråd != null )
                   tråd.interrupt();
                   tråd = null;
         //Körs när elefanten är vid liv
         public void run()
              while( tråd != null )
                   rörelse();
                   try
                        Thread.sleep(DELAY);
                   catch(Exception e){}
    }

  • Are methods in the Graphics class Thread Safe

    Can methods from the Graphics class (.e.g. drawImage(), drawString(), ect..) be called from any thread? In other words, can two threads that refer to the same Graphics object step on each other methods calls?
    TIA,
    DB
    Edited by: Darth_Bane on Apr 27, 2009 1:44 PM

    No,
    They are GUI activities so you should call them from the Swing Thread ( Event Disptach Thread)
    Now for the JComponent the following are thread safe:
    repaint(), revalidate, invalidate which can be called from any thread.
    Also the listener list can be modified from any thread addListenerXX or removeListenerXX where XX is ListenerType
    Regards,
    Alan Mehio
    London, UK

  • Information about Graphics class

    how will I be able to see the source code of the graphics class.

    As far as I can see there's no ByteArray class in the standard API.
    There are java.io.ByteArrayInputStream and java.io.ByteArrayOutputStream objects, and also there's java.util.BitSet.
    The syntax for them is the same as for any other part of the language. You probably mean the API. The API is in fact well-documented, just like most of the API.
    You don't need to import any package. You do need to import the classes or just refer to them with their full name (including package).
    All these things are determined from reading the documentation.
    Do you have any specific questions?

  • How to copy message class from SAP 4.7 to SAP ECC 6.0.

    Hi all,
    I want to copy message class created in SAP 4.7 to SAP ECC 6.0.,
    is it possible? if yes, can anyone suggest the procedure  to do it..
    Thanks & Regards,
    Vaikunt.
    Edited by: vaikunt on May 7, 2010 8:03 AM

    Hi Kiran,
    See here the System Version are entirely different. The one is 4.6C and other is ECC 6.0. See there will not be any link between 4.6 and ECC. When we will do SCC1 means the same system divided in to 2 clients means
    100 is development and 200 is the testing system..
    All the things you made in 100 will be there in 200 system. But the system depenended data you need to pass by doing theSCC1.
    Escpecially the Script .
    With Regards,
    Sumodh.P

  • Newbie help needed w/Graphics class!

    Hi everyone,
    I'm stuck on something I know is very simple to do, but I can't seem to find the right combination. I have a derived class that draws a circle using the graphics class. I'm getting compilation errors when I try to set the color and draw the circle. I have looked thru these forums as well as the API. Below is my code. Any pointers would be highly appreciated!
    import java.awt.Graphics;
    public class SmartCircle extends SmartShape
    SmartCircle(int first, int second, int third, Color c)
    super(first, second, third, c);
    public void draw(Graphics g)
    setColor(Color c);
    fillOval(first, second, size, size);
    }

    Here is SmartShape. It is located in the same directory as SmartCircle, so therefore doesn't need to be imported, correct?
    public abstract class SmartShape
    //define instance variables
    protected int positionX, positionY, size;
    protected Color theColor;
    public SmartShape()
         //initialize variables
         positionX = 20;
         positionY = 20;
         theColor = Color.white;
    public SmartShape(int first, int second, int third, Color c)
         if (first >= 0)
         positionX = first;
         else
         positionX = 0;
         if (second >= 0)
         positionY = second;
         else
         positionY = 0;
         if (third >= 0)
         size = third;
         else
         size = 0;
         theColor = c;
    public abstract void draw(Graphics g);
    Hope that helps!
    Melissa

  • CDR-17066 RON cannot find java EWT graphics classes

    Hello,
    I am evaluating Oracle SCM. Everything's going great, except I am unable to use the Version History or Version Events. When I try, I get an error:
    "CDR-17066: RON cannot find java EWT graphics classes"
    The action it recommends is to check the registry or environment variable JVM_CLASSPATH_RON, and make sure it points to the ewt jar.
    I found a jar called ewt3.jar in my oracle/jlib directory. There was no environmental variable called JVM_CLASSPATH_RON, so I created one and set it to that jar. But I'm still getting the same error.
    Any help would be appreciated. Thank you.

    Hi,
    this error message is rather strange: I checked in our knwoledge base, but you seem to be the first one having this issue!
    I had a look to my registry and indeed I couldn't find the variable JVM_CLASSPATH_RON.
    I suspect that this variable was superseded by another one (JVM_CLASSPATH_DEFAULT_THIN_JDBC ?).
    I checked for all variables including ewt and found the following:
    . FORMS90_CLASSPATH (<Home>\jlib\ewt3.jar)
    . FORMS90_BUILDER_CLASSPATH (<Home>\jlib\ewt3.jar)
    . JVM_CLASSPATH_DEFAULT_THIN_JDBC (<Home>\jlib\ewt4.jar)
    FORMS90_... variables are not used by the Version History and Version Event Viewers, but JVM_CLASSPATH_DEFAULT_THIN_JDBC is.
    I removed the entry <Home>\jlib\ewt4.jar from JVM_CLASSPATH_DEFAULT_THIN_JDBC, and then I could reproduce your issue.
    So could you check the content of this variable JVM_CLASSPATH_DEFAULT_THIN_JDBC?
    It's located in HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\HOMEx\REPADM61\DEFAULT_JVM_PARAMS_THIN_JDBC
    Could you also check that file <Home>\jlib\ewt4.jar does exist on your machine?
    Regards,
    Didier.

  • Color filling problem in fillarc() method of Graphics class

    I draw a circle in a panel. The circle space is divided to more than one sectors.The sectors are filled to particular color using fillarc(int x, int y, int start_angle, int end_angle) method of java.awt.Graphics class.
    When i fill the color, i faced a problem. That is i have seen the panel background Color in some pixels of thet arc spaces.
    How will i fill the particular color in full arc spaces? How will i solve this problem?
    Thanks for your advance reply.
    Regards
    Murali.R

    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class ArcFill extends JPanel {
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            double radius = Math.min(w,h)*7/16.0;
            double x = (w - 2*radius)/2;
            double y = (h - 2*radius)/2;
            Ellipse2D.Double circle = new Ellipse2D.Double(x,y,2*radius,2*radius);
            // Fill east sector with Arc2D.
            Rectangle r = circle.getBounds();
            double start = -45.0;
            double extent = 90.0;
            int type = Arc2D.PIE;
            Arc2D.Double arc = new Arc2D.Double(r, start, extent, type);
            g2.setPaint(Color.red);
            g2.fill(arc);
            // Fill south sector.
            arc.setAngleStart(-135.0);
            g2.setPaint(Color.green.darker());
            g2.fill(arc);
            arc.setAngleStart(-225);
            g2.setPaint(Color.blue);
            g2.fill(arc);
            arc.setAngleStart(-315);
            g2.setPaint(Color.orange);
            g2.fill(arc);
            // Draw circle and lines.
            g2.setPaint(Color.black);
            g2.draw(circle);
            double theta = -Math.PI/4;
            double cx = circle.getCenterX();
            double cy = circle.getCenterY();
            for(int j = 0; j < 4; j++) {
                x = cx + radius*Math.cos(theta);
                y = cy + radius*Math.sin(theta);
                g2.draw(new Line2D.Double(cx, cy, x, y));
                theta += Math.PI/2;
        public static void main(String[] args) {
            ArcFill panel = new ArcFill();
            panel.setPreferredSize(new Dimension(400,400));
            JOptionPane.showMessageDialog(null, panel, "", -1);
    }

  • Anchor point used in drawImage() of  Graphics class

    Hi all,
    This is sourab.I need to know about the concepts of anchor point used in drawImage() of Graphics class.We all know in drawImage() method has four co-ordinates.First one is for Image name,second one is for x coordinate ,third one is for y coordinate and the final one is for anchor point.Actually anchor point will place the image in the corresponding position.Now my doubt is what is the purpose of x,y coordinates.
    Also i want some links to learn about this anchor point concepts.Can anyone provide solution to me ASAP.
    Regards/Thanks,
    Sourab

    We all know in drawImage() method has four co-ordinates. [co&ouml;rdinates?]http://java.sun.com/javase/6/docs/api/java/awt/Graphics.html
    Or 5 or 6 or 7 or 10 or 11. And if you include Graphics2D:
    http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html
    There is second one taking 4 arguments, and one taking 3.

  • Chapman 2D graphic class

    Where can find Chapman 2D graphic class ?

    Maybe this helps:
    http://forum.java.sun.com/thread.jspa?threadID=558245&messageID=3232226

  • Graphics class questions

    Hey,
    I have two questions about drawing shapes in action script 3.0, using graphics class (flash.display.Graphics):
    Question 1.
    When I draw some more complicated shape consisted of a few simpler shapes (i.e. two circles), and the shapes overlaps, the overlapped region is inverted (is rendered as a "hole"). Is there any way to avoid that?
    This is simple example of this behaviour:
    var oClip : MovieClip = new MovieClip();
    oClip.graphics.beginFill( 0x000000, 0.5 );
    oClip.graphics.drawCircle( 150, 200, 70 );
    oClip.graphics.drawCircle( 250, 200, 100 );
    oClip.graphics.endFill();
    this.addChild( oClip );
    I know,I can do it using separate beginFill/endFill sections for each circle:
    var oClip : MovieClip = new MovieClip();
    oClip.graphics.beginFill( 0x000000, 0.5 );
    oClip.graphics.drawCircle( 150, 200, 70 );
    oClip.graphics.endFill();
    oClip.graphics.beginFill( 0x000000, 0.5 );
    oClip.graphics.drawCircle( 250, 200, 100 );
    oClip.graphics.endFill();
    this.addChild( oClip );
    but then when I use alpha blending, the shapes are blended separatelly. Unfortunatelly, this is not correct for that what I want to do.
    I need to draw one beginFill/endFill session but without "holes" in the final shape, is it possible?
    Question 2.
    Is there an action script counterpart of the Flash menu option: Modify->Break Apart ?
    Many thanks for any help.

    I don't think there is going to be any easy way to do this. But you might want to look at the drawPath command. It allows you to set the winding-rule for the drawn shape and may help.
    Notice the star in the example code goes from filled to not filled and it doesn't show overlap either....

  • Inherit from a graphical classe

    Hi,
    It seem to be impossible to create a new class who inherit from
    a Forte graphical class (like ArrayField for example).
    I'd like to add a new method to ArrayField so I imagine a
    new class who inherit from ArrayField.
    Does somebody knows if it is possible ?
    Thanks by advance.
    Jean-Baptiste BRIAUD
    SEMA GROUP
    16 rue Barbes
    92126 Montrouge
    France
    Tel. : 01 30 92 30 92

    Java class names should start with an uppercase letter.... and should indicate the purpose of the class, that is to say, what it represents.
    For example, the class that best describes the reason behind many postings here:
    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/nio/charset/CoderMalfunctionError.html{color}
    and the outcome of those postings:
    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/nio/charset/CoderResult.html{color}
    In lighter vein, Darryl

  • Reply  immediatelt !!!!!!!!! implement Graphics Class in application Progra

    Dear Sir,
    How to implement Graphics Class in an Constructor in an Application Program.
    for Example
    In Applet
    public void init(){
    Graphics g;
    Dimension d;
    Font f;
    FontMetrics fm;
    g = getGraphics();
    d = size();
    f=new Font("Dialog",Font.PLAIN,12);     
    g. setFont(f);
    fm = g.getFontMetrics();
    standalone Application program
    Words(){
    Graphics g;
    Dimension d;
    Font f;
    FontMetrics fm;
    g = getGraphics();
    d = size();
    f=new Font("Dialog",Font.PLAIN,12);     
    g. setFont(f);
    fm = g.getFontMetrics();
    when we try to implement in an standlone Application program it gives
    Null Pointer Exception how to implement Grapics Class in an constructor of standlone Application program.

    I think this is an appropriate reply for this...

  • Abstract Graphics class ???ques???

    Referring to the abstract methods within this class such as drawPolyline and drawPolygon, etc . . . it says in the documentation for Class Graphics:
    "The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images."
    There are no sub-class method overrides for drawPolyline and drawPolygon, for example, except for those in subclass Class DebugGraphics, which in turn call Graphics.drawPolyline and Graphics.drawPolygon - for example - at the end of the method implimentation anyway.
    And besides, DebugGraphics is a swing class, and I would not be importing it in a strictly AWT application anyway.
    So where is the actual code for these methods is what I am wondering?
    Thanks;
    ~Bill

    The Graphics class is subclassed in JVM specific classes since rendering
    graphics on different machines is going to be done differently (this
    was discussed recently). So to use these methods find a suitable object
    (like an image already loaded) and call getGraphics on it. This will
    return a Graphics object cast from the JVM specific graphics subclass...
    Steve

  • Multiple Similar Buttons: Copy, Duplicate, Class, Layer?

    I have Main Scene where you can navigate clicking simple text buttons I have created. The buttons look the same except the text is different i.e. "Scene 2" and "Scene 3". On Scenes 2 and 3 I use the same back button, which is vector graphics made from lines and a rectangle.
    What is the best practise using the same button to create the other buttons? Should I duplicate the button or copy paste it? Should I have a new layer for each button? Should I create a custom class for the button?
    Below is the code I'm using on each scene:
    // MAIN SCENE
    stop();
    // LISTENERS
    scene2Button.addEventListener( MouseEvent.CLICK, toScene2 );
    scene3Button.addEventListener( MouseEvent.CLICK, toScene3 );
    // FUNCTIONS FOR THIS SCENE
    function toScene2( event ) {
      gotoAndStop( 1, "Scene 2" );
    function toScene3( event ) {
      gotoAndStop( 1, "Scene 3" );
    // FUNCTIONS FOR OTHER SCENES
    function toMainScene( event ) {
      gotoAndStop( 1, "Main Scene" );
    // SCENE 2
    stop();
    // LISTENERS
    backButton.addEventListener( MouseEvent.CLICK, toMainScene );
    // SCENE 3
    stop();
    // LISTENERS
    backButton.addEventListener( MouseEvent.CLICK, toMainScene );
    And here are the .fla, .swf and other files I have created:
    Navigation Example

    Rob Dillon. You gave me something to think about with the «Don't use "scenes".»
    Adobe says "Rather than working with scenes created in the Scenes panel, consider using movie clips or jumping to frames in the main Timeline instead." http://www.adobe.com/devnet/flash/articles/efficiency-tips.html
    I'm going to teach programming with my Flash project, and I just can't find another way comfortable to me of taking the project to pieces. I'm thinking of a main scene where you can select what you want to learn, like commenting, control statements (if, while), methods (static), arrays, classes, inheritance, exception handling (throw, catch) and so on. You press buttons or links to get to the other sections. The pages mainly consist of text and code examples. I might add a quiz as the last scene perhaps with some animations.
    Any suggestions on how to use Movie Clips on that, because using a lot of frames means I would have to scroll to right and left all the time? I'm new to Flash, so I'm still experimenting and pondering my options.

Maybe you are looking for

  • Difference between ORacle 8i Standard & Enterprise

    Hi, 1. I am looking for a document mentions the difference between Oracle 8i Standard & Enterprise editions. 2. Components in Standard edition? (eg. Oracle Intermedia?) Raj

  • 2013 Run-Time error 32809 on macro

    I am unable to have a file open correctly that has 'automatic macros'.  The file work in 2010 and now I have the run-time error.  This workbook is created by outside source and is password protected. Thanks for any assistance.

  • Setting PDF File Open Behavior?

    I know that I can set the Acrobat Page Display Preferences to display files the way I like to view them (e.g. Two Up, Zoom: Fit to Page). However, can I embed the page display behavior to open a file in a certain page view mode (possibly overriding u

  • Trouble bringing in MP4 files?

    I'm on a mac and I am having a hard time importing different file formats (AVI,MOV). Specifically, I'm learning the program and want to practice with my flip video that takes mp4.s. What is the best way to be able to use the mp4 files in PPCS4?

  • OSX 10.4.7 Update won't Install

    Trying to upgrade from 10.4.2 to 10.4.7 and the install failed, said to retry. I have rebooted and retried several times, but it still won't run. AND NOW, safari, i chat, entourage, help, photoshop, etc won't open. I can't even empty the trash. I've