Store drawings in an object
Hi
Could any one please tell me how to store a drawing in an object?
I wanna store
g.drawLine(p1.x, p1.y, p2.x, p2.y);
in an object (like a JPanel or a JLabel whichever is possible)
Can anyone please help?
Thanks
[ [b]N.B. - The same post is also on the swing section and since there are alway the maximum numbers of users on this forum and also because my post there wasnt receiving much views, I thought to post it here as well.
http://forum.java.sun.com/thread.jspa?messageID=9446737� ]
I know what i have been suggested and what I need to work on.Maybe you know, but other dont'. Here is one suggestion from this posting:
Add them to a collection. When it comes time to draw, loop through the collection and draw everything in it.
That is exactly the way the first example I gave you works. Like I said you would need to modify it for you purposes.
But you have just wasted someone elses time because you are multi-posting and cross-posting questions so nobody else knows what has already been suggested.
So, please STOP posting such commentsSo please quit multi-posting and cross-posting
By the way, 30 mins is a lot of time.No it isn't. This is a forum where people freely donate their time. A question gets answered when somebody knows the answer, not because 30 minutes is up.
I know what i have been suggested and what I need to work on. No you don't because you still don't understand how painting works. You've rejected every solution posting in your 3 postings even though they have been valid suggestions. Things just don't work the way you want them to. So deal with it and move on.
Similar Messages
-
I store drawings in I books for use in the field, which comes in very handy. Lately I haven't been able to download anymore drawings or PDF's to IBooks. Is there a storage limit?
I have done this on numerous occasions but I think that my Iphone has a defect. After many tries, reinstalls, deletion of content, changing content to be stored on external hard drive, deleting itunes and cleaning computer I managed to get all of the songs on and things seemed okay for a while.
The problem returned about a week ago after downloading a new album from Itunes. I now have 12.5k of songs leaving 10gb spare on Iphone which should be more than enough room to operate properly. Last night it seemed to be dowloading ok (after doing all of the above again for the umpteenth time) this morning it revealed that it had just synched 2.5k of songs and 18gb of "other" on the contents bar. it wont synch now as it says its over capacity. So the 18gb of "other" would probably be corrupted data that means it must corrupt each song as it tries to synch it.
The 2.5k of songs it did synch are working on the Iphone as is every song in the library on Itunes. I did completely delete the new album I bought and redownloaded it from the store then tried to synch just that album and it worked fine.
Just about time to dump apple I think! -
Itunes does not allow me to change the store due to rent objects not yet expired. there are non left.
ChrisHi Evii0105,
The article linked below details a number of troubleshooting steps that can help restore your computer's ability to connect to the iTunes Store.
Can't connect to the iTunes Store
http://support.apple.com/en-us/HT201400
Cheers,
Allen -
How to Store java.util.Map object using JPA
Hi
I have a cache where the underlying object is just a map (HashMap for example).
I'd like to create a JPA backing store for this cache.
Is there a way to do that, or can JPA only store objects that are JPA annotated?
Thanks
Edited by: mesocyclone on Dec 11, 2008 4:22 PMHi,
I believe that the objects that the Map contains would need to be JPA annotated.
--Tom -
Help, how would I store an array of objects ?
im doing a java project on creating a music database, i need to store an array of cd objects, each entry in the array will be a single object for a cd.
The objects are: Artist, Album, No of tracks
could sum1 point me in d right direction, thanksThis is the wrong forum. Please ask again in the [new to java forum|http://forum.java.sun.com/forum.jspa?forumID=54] .
Assuming you want to store them on disk, you can either use a database (java technologies for this is JDBC and JPA ) or write them to a file using the java technologies Serialization or Beans Persistence. -
Where does flash stores the local shared object data
HI All,
I'm using shared object to store local data:
var so:SharedObject = SharedObject.getLocal(storageName);
// Store the data
so.data.userName = userName;
so.flush();
Where does it actually saved on my hard disk (in windows vista operating system).
10x,
Liorhttp://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=lsos_087_3.html
The term local refers to the location of the shared object.
In this case, Adobe Flash Player stores the SharedObject file locally
in the client's home directory.
When you create a shared object, Flash Player creates a new
directory for the application and domain. It also creates an empty
*.sol file that stores the SharedObject data. The default location of
this file is a subdirectory of the user's home directory. On Windows,
this directory is the following by default:
c:/Documents and Settings/username/user_domain/Application Data/Macromedia/Flash Player/web_domain/path_to_application/ApplicationName/objectName.sol
If you request an application named MyApp.mxml on the local host, in the Flex context, and within a subdirectory named /sos, Flash Player stores the *.sol file in the following location on Windows:
c:/Documents and Settings/username/user_domain/Application Data/Macromedia/Flash Player/#localhost/flex/sos/MyApp.mxml.swf/objectName.sol -
Best Way to store references to other objects
Hi there,
I want to design a class, that has several references to other instances. What is the best way to store such references within the class? As a vector? As a Hash-Table?
What I need are:
-get a certain element in this data-structure fast (let's say the fifth)
-be able to list all elements referenced
-delete a certain element (e.g. 5th one out of 10)
What I do not necissarily need is:
-to be able to search if a certain object is referenced by this one
What do you propose?
Any ideas?
Thx
Karlheinz ToniAny thoughts on hashtables etc?
I used them in an application where i needed to get
objects quickly. It allowed me to get the objects
based on a criteria instead of by the object itself.
It was really useful for me.Use HashMap instead of Hashtable. HashMap would also work but you can't get element 5 unless you use the element number as a key. If you do use the element number as the key, it's kind of like using a List except it won't renumber itself, which you may or may not want. For example, if you remove element 5 from a List element 6 (if it exists) becomes element 5. If you remove key 5 from the HashMap you just don't have an element 5 anymore i.e. the map will return null for get(new Integer(5)); -
XML file in the form of .config file how to convert it to class and store it in single object
Hi,
I have a config file in which i have to convert it to class and get an object.
example:
<?xml version="1.0" encoding="utf-8" ?>
<xyz xmlns="">
<Container name ="Basic">
<Connectivity user="" server="" protocol="udp"/>
<Connectivity user="" server="" protocol="udp"/>
</Container>
<Container name ="Cp">
<settings version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.counterpath.com/cps">
<domain name="audio">
<section name="headset">
<setting name="audio_in_agc_enabled " value="1"/>
</section>
<section name="incoming">
<setting name="use_agc" value="1"/>
</section>
<section name="vad">
</section>
</domain>
<domain name="system">
<section name="qos">
<setting name="audio" value="tos 46"/>
</section>
<section name="dtmf">
<setting name="force_send_in_band" value="0"/>
<setting name="minimum_rfc2833_play_time" value="40"/>
</section>
<section name="network">
<setting name="dtx_enabled" value="0"/>
</section>
<section name="diagnostics">
<setting name="enable_logging" value="1"/>
<setting name="log_level" value="Error"/>
</section>
<section name="general">
<setting name="add_OS_version_to_user_agent_header" value="1"/>
</section>
<section name="indialog_notify">
<setting name="enable_indialognotify" value="1"/>
</section>
</domain>
<domain name="rtp">
<section name="2833">
<setting name="enabled" value="1"/>
<setting name="packet_time_in_ms" value="60"/>
<setting name="payload_number" value="101"/>
</section>
<section name="inactivity">
<setting name="timer_enabled" value="0"/>
</section>
</domain>
<domain name="proxies">
<section name="proxy0">
</section>
<section name="proxy1">
</section>
</domain>
<domain name="ggg">
<section name="device">
<setting name="use_headset" value="1"/>
<setting name="rrr" value="1"/>
<setting name="eee" value="480"/>
<setting name="eme" value="hhh"/>
<setting name="headset_name" value="vvv"/>
<setting name="manual_audio_devices_configure" value="0"/>
<setting name="audio_in_device" value=""/>
<setting name="audio_out_device" value=""/>
<setting name="ringer_device" value=""/>
</section>
<section name="system">
<setting name="export_settings" value="EndpointSettings.xml"/>
<setting name="enable_export_settings" value="0"/>
<setting name="log_level_AbstractPhone" value="0"/>
<setting name="log_level_Audio" value="0"/>
<setting name="log_level_Auto Configuration" value="0"/>
<setting name="log_level_CCM" value="0"/>
<setting name="log_level_Conferencing" value="0"/>
<setting name="log_level_Contacts" value="0"/>
<setting name="log_level_DNS" value="0"/>
<setting name="log_level_GUI" value="0"/>
<setting name="log_level_Jitter" value="0"/>
<setting name="log_level_Licensing" value="0"/>
<setting name="log_level_Media" value="0"/>
<setting name="log_level_Privacy" value="0"/>
<setting name="log_level_RTP" value="0"/>
<setting name="log_level_STUN" value="0"/>
<setting name="log_level_Security" value="0"/>
<setting name="log_level_Storage" value="0"/>
<setting name="log_level_Transport" value="0"/>
<setting name="log_level_USB Devices" value="Info"/>
<setting name="log_level_Utilities" value="0"/>
<setting name="log_level_Video" value="0"/>
<setting name="log_level_Voice Quality" value="0"/>
<setting name="log_level_XMPP" value="0"/>
<setting name="log_level_Endpoint" value="6"/>
</section>
<section name="beeptone">
<setting name="play_locally" value="0"/>
<setting name="enable_beeptone" value="1"/>
<setting name="beeptone_file" value="beep.wav"/>
<setting name="beeptone_timeout" value="30000"/>
</section>
<section name="dtmf">
<setting name="play_locally" value="1"/>
<setting name="pause_start_stop_dtmf" value="100"/>
</section>
<section name="control">
<setting name="auto_answer" value="0"/>
</section>
<section name="ctrol">
<setting name="auto_ans" value="0"/>
</section>
</domain>
</settings>
</Container>
</xyz>
Please help me out in creating an object from it.
Thanks,
HiranmayeeIt's one of those things you usually start from the other end.
IE with a class and then serialise / deserialize to xml.
Because you have a namespace in there:
<settings version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.counterpath.com/cps">
I think you will find linq to xml will have issues with that.
You could still use xpath to pick data out of there and there's been a thread on the c# forum recently which is relevent:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/2dc0581e-f2fd-4fd3-89ee-e59280c398e6/read-xml?forum=csharpgeneral
Why do you want to turn that into an object?
By the way.
This isn't a wpf question and you should probably have posted it on the c# forum.
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
How to upload and store attachments to an object in ABAP Webdynpro ?
Hi all,
I would like to upload file attachments of various types to a document within SAP (in this case Expense Reports), using Webdynpro ie. The attachment belongs to a particular expense report. So each document , whether Word, Text, Bitmap etc. would be accessible thereafter by an Expense Report number.
In SAPGUI, we have the powerful function module GOS_ATTACHMENT_LIST_POPUP which takes a user-defined object key to create and change documents.
I'm trying to find an equivalent interface for this in WDynpro. I looked at the component WDK_POWL_WF_DETAIL, but this seems to be suited to Workflow. Can anyone out there give some further tips or examples around this ?
Regards,
GabrielUpload using the com.oreilly.servlets package- I don't recall the exact method for using this but it is pretty easy.
Check the file size and type on upload. Only accept gifs and jpgs smaller than 50k (standard for web- go above this if you like but will take time to download and possibly annoy users.)
Use AWT to create standard size thumbnails of the pictures or to standardize them so they will fit on the page properly.
Write the images to the requisite directory. I would suggest giving them a name which matches them directly with the record id number (such as catalogueitem1.jpg) or submit the image name to the database.
If you are serving on Unix you will need Xvfb or something like it running on your server for AWT to work.
To display it just take the value from the database and add it to the filename, e.g. :
<img src="/catalogue/catalogueitem<%=databaseid%>.jpg">
I'm afraid the code I do this with at the moment is very poor and you will do a lot better with a little research into the topic than trying to follow what I have written. -
How to read date as string (format dd-mm-yyyy) and store it as Date object
Hi. I would like to read from keyboard String with a date and put this value to Date object. How can i do this???
ThanksCheck out java.text.SimpleDateFormat.
Basically
String dateString = readUserInput(); // get the string
SimpleDateFormat myFormat = new SimpleDateFormat("dd-MM-yyyy");
Date myDate = myFormat.parse(dateString); -
Where these properities will store for an OLE object
Hi,
REPORT.
INCLUDE OLE2INCL.
TYPE-POOLS OLE2.
DATA: out TYPE ole2_object,
outmail TYPE ole2_object.
CREATE OBJECT out 'Outlook.Application'.
CALL METHOD OF out 'CREATEITEM' = outmail
EXPORTING #1 = 0.
SET PROPERTY OF outmail 'TO' = 'surya@xxzilcom' .
SET PROPERTY OF outmail 'CC' = 'fdsfs_moida@xxoocom' .
SET PROPERTY OF outmail 'SUBJECT' = 'Sending emails'.
SET PROPERTY OF outmail 'BODY' = 'this is body of the mail'.
SET PROPERTY OF OUTMAIL 'VISIBLE' = 1.
CALL METHOD OF outmail 'SEND'.
how can I find , where these properities(TO, CC, SUBJECT, BODY) are stored for a particular object.
Regards,
suryaHi Bert,
My below code is working fine but I amn't getting how can I attach a file to that mail.
Could you please tell me how can I attach a file to that mail.
REPORT.
INCLUDE OLE2INCL.
TYPE-POOLS OLE2.
DATA: out TYPE ole2_object,
outmail TYPE ole2_object.
CREATE OBJECT out 'Outlook.Application'.
CALL METHOD OF out 'CREATEITEM' = outmail
EXPORTING #1 = 0.
SET PROPERTY OF outmail 'TO' = 'surya_moida@yahoocom' .
SET PROPERTY OF outmail 'CC' = 'fdsfs_moida@yahoocom' .
SET PROPERTY OF outmail 'SUBJECT' = 'Sending emails'.
SET PROPERTY OF outmail 'BODY' = 'this is body of the mail'.
SET PROPERTY OF OUTMAIL 'VISIBLE' = 1.
CALL METHOD OF outmail 'DISPLAY'.
Regards,
Surya -
Adobe Shape doesn't store drawings to My Library
I am using Adobe Shape and it works fine but does not place drawings into My Library. I check My Account in the app and it says I have used 0.0% of my storage despite having stored several drawings. When I go to Illustrator and open My Library nothing is there. All versions are up to date. How do I fix this?
File Sync Links that may help... all the links I have, since I don't know the cause of your specific problem
-https://forums.adobe.com/community/creative_cloud/host_sync
-http://helpx.adobe.com/creative-cloud/help/sync-settings.html
-http://helpx.adobe.com/creative-cloud/kb/arent-my-files-syncing.html
-Size Limits https://forums.adobe.com/thread/1488242
-sync and email link http://forums.adobe.com/thread/1427516?tstart=0
-Phantom folder problem https://forums.adobe.com/thread/1490445 -
How do I create an object store on JMQ 2.0?
I have a question about creating an object store in JMQ 2.0 using the
administration tool.
The documentation doesn't explain it that clearly because it says for
development purposes, you should be able to get away with the default
configuration. The default configuration as far as I can see has no object
store for JNDI lookup.
What I need is an object store that I can connect with using an
InitialContextFactory to the broker URL. I'd like to then use that
Connection to lookup ConnectionFactories (topic and queue).
Again, I thought the documentation would explain all of this, but haven't
been able to find anything. Please advise.To answer your question, you can use the 'jmqadmin'
(graphical interface) or 'jmqobjmgr' (command line interface)
to configure administered objects that you store in a
JNDI service provider. This object store has to be set up
in advance which may mean creating a directory if a file store
is used, or setting up an LDAP server.
Here as the basic steps to add administered objects
if you're using the graphical implementation ('jmqadmin'):
1. Set up some sort of object store repository outside the admin
tool (you can use LDAP or create a file system directory).
2. Add an Object Store connection to the repository you
just set up:
- Run 'jmqadmin', click on the tree node "JMQ Object Stores".
- Select Actions->Add Object Store.
- Name this Object Store with a value in "Object Store Label".
- Fill in the values for java.naming.factory.initial
and java.naming.provider.url and any other necessary JNDI values.
- Select OK
3. To add objects to this object store you just set up:
- First make a connection to this store:
Select Actions->Connect to Object Store
- Click on the "Destinations" or "Connection Factories" node
under this object store.
- Click on Actions->Add Destination Object or Add Connection Factory Object
and fill in the values in the dialog. -
Calling a java object from a store procedure
I have written a translation object in java that takes a $en_var in and returns its path.
What I need to do is call that object from a PL/SQL store procedure. All the examples I have seen treat the store procedure as a wrapper around the java object.
But in my store procedure calling the object is only one part of the procedures role:
The store procedure code is :
CREATE OR REPLACE PROCEDURE WRITE_TO_FILE(in_file_name IN VARCHAR, in_en_var IN VARCHAR)
file_handle UTL_FILE.FILE_TYPE;
file_location VARCHAR2(50)
BEGIN
I need to be able to call the javaobject translation here
file_location = translation.translatePath(in_en_var)
file_handle := UTL_FILE.FOPEN(file_location, in_file_name, 'w');
dbms_output.put_line ('input file name opened file name' ||in_file_name ||'-->' ||in_file_location);
UTL_FILE.put_line(file_handle,'Hello Tony);
UTL_FILE.FCLOSE(file_handle);
END WRITE_TO_FILE;
I call the java class method translatePath with a string the en_var which returns the path as a string which is then passed as a parameter to UTL_FILE.FOPEN.
Thanks for any help
TonyNo Longer the problem
-
Store a set objects dynamically in a file
Hi, I was wondering if anyone knows a good way to store a set of objects in a file, in my case emails.
The mail itself is divided in 4 parts right now (very simple),
First object = address
Second ob = subject
Third ob = date
Fourth ob = message
I can write and read back one message, but then it get's hard, how can I dynamically write a set of four objects in a file, and then read them back set by set. Should I write the sets out line by line and then read them back the same way or what?
I would appreciate some help very, very much.
Thank's
Fredrik G�randerHmm, didn't think about that, I guess there are numerous ways to pull it off, but it's a good point, can't say I'm that much of a XML wiz though but I'll try it, thank's a lot for the tip.
Fredrik.
Maybe you are looking for
-
How do i access my iCloud files on my Mac?
I don't know how to access icloud on my Mac? Can anyone help?
-
My Adobe Photoshop Cs4 Is Not Showing all Formats/Extensions. when i edit a picture and wants to save in .png or .bmp or in any other format ... there is no .png In the Save As List, There are only Some Extenstions in that list like Jpeg-Psd-Tif etc.
-
How to Re-install Photoshop CC
My CC app says it is installed but I get the following message when I open it: You can't open the application "Adobe Photoshop CC" because it may be damaged or incomplete. I've tried deleting it, but it does nothing while CC say it is still installed
-
GRC AC ARA v10 SP13 - Org Rule Org Level Missing
Hi Experts! Testing ARA Organization Rules soon and have noticed that one of my key Org Levels, $BUKRS, is missing. I have not yet used this functionality on this system. I am already doing the following: running the authorization sync job daily (we
-
Creating XML from a POJO using StAX
Hi Experts, I have a POJO and now want to create an XML which has the elements as that of the POJO using StAX. Can anybody please help me out. Thanks in advance.