Source Code Cross Referenced for TextureView.java in  » Swing-Library » abeille-forms-designer » com » jeta » swingbuilder » gui » effects » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » abeille forms designer » com.jeta.swingbuilder.gui.effects 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (C) 2005 Jeff Tassin
003:         *
004:         * This library is free software; you can redistribute it and/or
005:         * modify it under the terms of the GNU Lesser General Public
006:         * License as published by the Free Software Foundation; either
007:         * version 2.1 of the License, or (at your option) any later version.
008:         *
009:         * This library is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:         * Lesser General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU Lesser General Public
015:         * License along with this library; if not, write to the Free Software
016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
017:         */
018:
019:        package com.jeta.swingbuilder.gui.effects;
020:
021:        import java.awt.event.ActionEvent;
022:        import java.awt.event.ActionListener;
023:
024:        import com.jeta.forms.gui.effects.TexturePainter;
025:        import com.jeta.forms.gui.form.GridView;
026:        import com.jeta.forms.store.properties.effects.PaintProperty;
027:        import com.jeta.forms.store.properties.effects.TextureProperty;
028:        import com.jeta.swingbuilder.gui.images.ImagePropertiesController;
029:        import com.jeta.swingbuilder.gui.images.ImagePropertiesNames;
030:        import com.jeta.swingbuilder.gui.images.ImagePropertiesView;
031:
032:        /**
033:         * @author Jeff Tassin
034:         */
035:        public class TextureView extends ImagePropertiesView implements 
036:                PaintView {
037:            /**
038:             * The preview for the gradient settings
039:             */
040:            private GridView m_preview;
041:
042:            /**
043:             * The texture property
044:             */
045:            private TextureProperty m_texture_prop = new TextureProperty();
046:            private TexturePainter m_painter = new TexturePainter();
047:
048:            /**
049:             * ctor
050:             */
051:            public TextureView(GridView preview) {
052:                this (preview, null);
053:            }
054:
055:            /**
056:             * ctor
057:             */
058:            public TextureView(GridView preview, PaintProperty pp) {
059:                super ("com/jeta/swingbuilder/gui/images/imageProperties.frm",
060:                        null);
061:                m_preview = preview;
062:                setController(new TextureViewController());
063:                if (pp != null) {
064:                    initialize((TextureProperty) pp.getPaintDelegate());
065:                }
066:            }
067:
068:            /**
069:             * @return the property for this view
070:             */
071:            public PaintProperty getPaintProperty() {
072:                return new PaintProperty(getTextureProperty());
073:            }
074:
075:            public TextureProperty getTextureProperty() {
076:                m_texture_prop.setIconProperty(getIconProperty());
077:                return m_texture_prop;
078:            }
079:
080:            /**
081:             * Initializes the view
082:             */
083:            public void initialize(TextureProperty tp) {
084:                if (tp != null) {
085:                    setIconProperty(tp.getIconProperty());
086:                    updatePreview();
087:                }
088:            }
089:
090:            /**
091:             * Sets the property for the view
092:             */
093:            public void setPaintProperty(PaintProperty pp) {
094:                if (pp.getPaintDelegate() instanceof  TextureProperty) {
095:                    TextureProperty tp = (TextureProperty) pp
096:                            .getPaintDelegate();
097:                    m_texture_prop.setValue(tp);
098:                    initialize(m_texture_prop);
099:                    updatePreview();
100:                }
101:            }
102:
103:            public void updatePreview() {
104:                m_painter.setTextureProperty(getTextureProperty());
105:                m_preview.setBackgroundPainter(m_painter);
106:            }
107:
108:            public class TextureViewController extends
109:                    ImagePropertiesController {
110:                private ActionListener m_delegate;
111:
112:                public TextureViewController() {
113:                    super (TextureView.this );
114:                    m_delegate = getAction(ImagePropertiesNames.ID_FILE_BUTTON);
115:                    assignAction(ImagePropertiesNames.ID_FILE_BUTTON,
116:                            new FileAction());
117:                }
118:
119:                public class FileAction implements  ActionListener {
120:                    public void actionPerformed(ActionEvent evt) {
121:                        if (m_delegate != null)
122:                            m_delegate.actionPerformed(evt);
123:                        updatePreview();
124:                    }
125:                }
126:            }
127:
128:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.