Viewing Window for Large Graphs

Hi! I'm looking for pointers on how to develop a viewing window for large graphs, otherwise called 'reference maps' or 'reference diagrams'. For instance, you might have a very large diagram that does not fit in your screen with a very small version of it to one side. Over the small graph, there would be a square box that you move around to focus over to section of the graph. As you move the box, the large diagram on the other side moves around to show that "enlarged" area covered by the box. I'm trying to avoid reinventing the wheel. I've found plenty of information on graphs and diagrams, but nothing close to what I need. Please help? Thanks!

Here's something I played with for a while.import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
public class Test extends JFrame {
    String text = "Hi! I'm looking for pointers on how to develop a viewing\n"+
            "window for large graphs, otherwise called 'reference maps'\n"+
            "or 'reference diagrams'. For instance, you might have a\n"+
            "very large diagram that does not fit in your screen with a\n"+
            "very small version of it to one side. Over the small graph\n"+
            ", there would be a square box that you move around to\n"+
            "focus over to section of the graph. As you move the box,\n"+
            "the large diagram on the other side moves around to show\n"+
            "that \"enlarged\" area covered by the box. I'm trying to\n"+
            "avoid reinventing the wheel. I've found plenty of\n"+
            "information on graphs and diagrams, but nothing close to\n"+
            "what I need. Please help? Thanks!";
    JTextArea jta = new JTextArea(text);
    JScrollPane jsp = new JScrollPane(jta);
    JPanel p = new ReferencePanel(jsp);
    public Test() {
     setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
     Container content = getContentPane();
     content.setLayout(new GridLayout(1,2));
     content.add(jsp);
     content.add(p);
     setSize(300,200);
     show();
    public static void main( String args[] ) { new Test(); }
class ReferencePanel extends JPanel {
    JScrollPane jsp;
    JScrollBar horiz, vert;
    Image img;
    public ReferencePanel(JScrollPane JSP) {
     jsp = JSP;
     horiz = jsp.getHorizontalScrollBar();
     vert = jsp.getVerticalScrollBar();
     jsp.getViewport().addChangeListener(new ChangeListener() {
         public void stateChanged(ChangeEvent ce) { updateView(); }
     jsp.getViewport().getView().addComponentListener(new ComponentAdapter() {
         public void componentShown(ComponentEvent ce) { updateView(); }
         public void componentResized(ComponentEvent ce) { updateView(); }
     addMouseListener(new MouseAdapter() {
         public void mousePressed(MouseEvent me) { setScrolls(me); }
    public void paint(Graphics g) {
     if (img!=null) g.drawImage(img, 0, 0, this);
    private void setScrolls(MouseEvent me) {
     vert.setValue(me.getY()*(vert.getMaximum()-vert.getVisibleAmount()/2)/getHeight());
     horiz.setValue(me.getX()*(horiz.getMaximum()-horiz.getVisibleAmount()/2)/getWidth());
    private void updateView() {
     Component c = jsp.getViewport().getView();
     if (c== null || c.getWidth()==0) return;
     Image i = c.createImage(c.getWidth(), c.getHeight());
     c.printAll(i.getGraphics());
     img = i.getScaledInstance(getWidth(), getHeight(), Image.SCALE_SMOOTH);
     repaint();
}

Similar Messages

  • Enlarging the viewer/window for videos

    When I try to view an older (non-HD) video in Aperture the viewing window is very small (1 inch by 1 inch in some cases where it was 160X120).  In iPhoto I simply was able to drag the window to make it larger.  That doesn't seem to work here.  Full screen mode doesn't alter the size either.  In fact, nothing I do seems to change the viewing size.  I tried zoom under the window menu and the view menu each without success.  Any suggestions?

    I do not know of any way to zoom the video viewer, other than using Quicktime as an external editor, but you can view your videos enlarged in Aperture, if you add them to a slideshow and then present the slideshow  in full screen mode or enlarge the viewer in the slideshow. The video will always be shown large enough to fill the viewer in the slideshow, even if it will be blown up too much,  like this:
    Regards
    Léonie

  • Viewer window for Log & Transfer disappeared

    Hello from Bonnie.
    I am capturing on P2 cards using the log & transfer.
    My viewer window which lets me see the clip & trim it disappeared, & I cannot find it.
    Does anyone know where this switch is.
    Thank you.
    Bonnie

    Hello Shane,
    This is an old post but I tried to find the the FCP preferences in my library & there weren't any there.
    I am using FCP 6
    Still can't get the trim/viewer window in my log and transfer from P2 Cards.
    Thanks for any info.
    Also I am trying to render a 45 minute timeline that is a year old & had lots of 3D VFX. I keep getting General Error & it won't let me render.
    I have had this problem over the years.
    Even if I close all other tabs, I get this.
    I really need to render this.
    Anyone know what to do?
    Cheers,
    bonnieember.blip.tv

  • Using Rener Window for 3DWaterfall graph in executable

    I'm using LabVIEW v11 on 32 bit Windows XP.
    When I'm working in the development environment I can right click on the 3D Waterfall graph and bring up the Render Window, this works fine and is a much better display than the main 3D indicator. Unfortunately now that I've built the executable this option to bring up the Render Window isn't there.
    Is there anything like a dll that I need to include in the build options. I've tried searching, but I can't seem to find much on the Render Window.
    Thanks
    Ian

    Thanks for the update.
    That's a pity. I've already shown the user, he was very impressed, now I will have to disappoint him.
    Regards
    Ian

  • Unix or Windows platform for large configuration

    Hello,
    I’m working on a scoping phase for a new SAP project. Targeted SAP users will be between 3000 and 4000.
    Like every time “the” standard discussion is opened: which platform to use?
    I would like to go above the classic point of view: UNIX for large system and Windows for small system.
    So I’m looking for success stories with large system running on Windows plateform.
    Thank you for your feedback.
    Alain

    My opinion UNIX flavors are always good for BIG implementations,It also depends on the database as well,for example with DB2 on AIX (where SAP also moving forward w.r.t DB) has got better performance compared to other combinations,and we have experienced that...

  • Mail mis-positions Viewer Windows on relaunch

    I run Mail 4.3 on 10.6.4 with 5 Viewer Windows:
    • a large Inbox window on my main monitor
    • 3 short windows on my right monitor showing 3 favorite folders (Sent + 2 others)
    • a large "work" window on my right monitor showing whatever folder I happen to be using at the moment
    When I quit Mail and relaunch, the five Viewer Windows reappear with their former sizes, positioned in two "stacks" (windows precisely on top of each other):
    • large windows
    • short windows
    The positions of these two stacks corresponds to the most recently active (touched) large and short windows before Mail quits.
    It takes only a minute to select and reposition the three mis-positioned windows, but it annoying to have to do this every ... time ... I ... launch ... Mail.
    -- Ward
    P.S. I've submitted this as formal Mail Feedback.

    I know this problem for a long time now. We would like to use Apple Mail as our companies email software, but we need to have about 20 mailbox lists open to be able to track what needs to be done. As long as Apple Mail does not remember the positions and states of each open window, the application is useless for us, which is quite a shame. Anyone else with this problem?
    Apple, please fix it!
    Marc

  • Audio clips in the Viewer window

    When I double click on an audio track from the timeline, to place into the viewer window, the tab always reads "Stereo (a1a2)" indicating the top (uppermost) track when I have clicked on the (A7A8) track. I have tried using the "Auto Select" toggle with no change. Also, once an audio clip appears in the viewer, all my previous tabs such Video, etc. disappear...Any suggestions?

    It doesn't seem to make sense that you are required to place the tracks into the viewer window for subsequent editing and the viewer has no way to identify what track you are working on???
    That's because - as FCP sees it - although you are working from a clip already placed into the Timeline (hence the sprocket holes in the Viewer's scrubber bar) all the relevant info references the clip as it was captured or imported.
    That is, even though your clip might be placed at 1:00:00;00 in the Timeline, it's In point is at, say, 0:35:24;17 in the clip's own timecode.
    If you've clicked on audio, the Viewer will display audio as sequential tracks for the clip (remember FCP 5 can have up to 24 tracks of audio for a clip). In FCP's way of thinking a1a2 are it's way of letting you know that there are only 2 audio tracks (a stereo pair) in your clip.
    And, yes, the logic can be quite dangerous.

  • How to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area

    how to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area
    ananya

    Hey Ananya,
    I believe what you want to do is possible, but it will not be
    easy.  If you want to add a scroll bar that will scroll the graph
    back and forth but keep the axis set, you would want to add a
    horizontal or vertical scrollbar.  Then you would create an event
    handler for the scroll event.  You would have to manually plot
    different data within this scroll event.  Unfortunately, there is
    not really a built in way to do this with the Measurement Studio plot
    control.
    Thanks,
    Pat P.
    Software Engineer
    National Instruments

  • Preparing for Large Batch of Windows Server Updates going back to Aug 2013

    How often do updates to Windows servers interfere with a servers performance, services, and/or software?
    In other words, after installing updates, what level of validation should be involved in making sure the updates are not causing issues on the server? With such a large batch of updates to install this weekend, I want to be prepared for worst case scenarios
    involving systems not booting up, required services not starting, software conflicts, etc. We have a 2008R2 server and a 2003 server to test on, but they're not really representative of the production servers in terms of the roles they play and services they
    run. Just to clarify, this is my first time updating Windows servers.

    1. There is a long term mantra: Test updates in test environment before applying updates in production systems.
    2. Situation is complicated a bit by the fact that there are "direct"  and WSUS update packages.
    3. MS states that updates are tested thoroughly. I do believe they do a good job.
    4. I work with Windows for a very long period and I am pretty sure that the quality of software including updates is increasing.
    5. I understand your hesitation, my first updates caused the same tension.
    6. You have a possibility to download updates for "direct" application from catalog update repository. Problem is that you do not know the optimal order of installation. Fortunately information on problems and their solution comes fast from Internet if you
    listen on right channels.
    7. From my point of view the danger stems from some optional updates, namely drivers may send your server to unexpected operation. I do prefer drivers and firmware from server/computer vendor, though some irregularities exists.
    HTH
    Milos

  • When I open itunes to play content I've already purchased and while attempting to view trailers for movies in the itunes store, I receive a generic error message from windows, and I'm directed to reinstall the latest version of itunes.  Not a fix.  Help?

    When I open itunes to play content I've already purchased and while attempting to view trailers for movies in the itunes store, I receive a generic error message from windows, and I'm directed to reinstall the latest version of itunes.  Not a fix.  Help?

    after perusing other subjects with playback issues: 
    this is the fix: 
    -Launch Control Panel - Double click Quicktime, If you do not see quicktime, look on the top left side of control panel and switch to classic view. This will then allow you to see Quicktime.
    -Now click the advanced tab and click on Safe Mode GDI Only, Apply, then ok.

  • Change view options for only one window

    Usually I prefer to view my windows as icons, but I like certain specific windows to show up in list mode. On 10.4, in the View Options, there was an option for "This window only" but that seems to be missing in 10.5. Am I just blind???

    I agree. i enjoyed that feature in 10.4. It drives me nuts that if I want to change the view options for one folder because of the way I want to view its specific contents, the rest of folders on my system changes at the same time. I would appreciate it if each folder had a "memory" of its own view option settings.
    However, I acknowledge that sometimes you would want to change a setting that affect all windows. But it shouldn't overwrite the remainder of the settings. If, for example, you wanted to change the text size of every icon in every window, but leave everything else as set in each individual folder, there should be an option for this!

  • Finder views change for all windows

    After playing around with Snow Leopard for just a few days, I noticed that when I change a view type in any Finder window, that view is applied to all windows. Is this by design? With Tiger, you could specify the view for "this folder only" or "all folders"

    Joe - I've been heavily researching this issue. I've received some helpful advice from baltow, but here is how I fixed my problem. While in Best Buy over the weekend, I played on one of their Macs running Leopard 10.5.8 to see if the problem started before Snow Leopard. It did, wasn't just me. Then I found this site:
    http://www.macintouch.com/leopard/faq.html#finder
    It said: *Why don't my window view settings stick?* The Leopard Finder's approach to consistency is to use the last view you selected in any Finder window for all new Finder windows. You can override this on a per-folder basis; go to the menu View > Show View Options (or press Command-J). This opens a view options Inspector (a mini-window much like a traditional Palette window); at the top of this window, check the "Always open in" box to force the folder always to show the current view.
    This is what was throwing me off - I thought that Always open in box was a global setting, not on an individual folder basis. With Tiger, you had two options: This window only, All windows.
    Now I will play with the Arrange By setting and see if that works as well.

  • Popup window for data selection in maintenance view

    Hi,
    How to create popup window for data selection in maintenance view. For example when you go to view v_t510 in se16, there you will see a popup window to enter values. after you enter the values in that window, then data related to those values that you entered in the popup window will displayed.
    How can we do that for the custom maintenance view?
    Thanks in advance for your help guys.
    Regards,
    Srinivas.

    In your custom maintainace view, if you select the Data browser / Table view maintainace under the tab "Maint Status" as "Dispaly maintanence allowed with restriction" than system will give you popup to restrict by selection.
    Regards,
    Naimesh Patel

  • PDF viewer for large files

    Hello,
    i want to view a very large PDF file (~1GB, ~500 pages). The viewers i tested (okular, evince, xpdf) are slow: if i browse through the document one page loads a specific time and is displayed. If i switch to the next page i have to wait again.
    Is there a viewer that loads the rest of the document while i read the first pages to scroll through the document without waiting after a while?
    Last edited by oneway (2009-05-12 19:28:07)

    Thanks so long.
    acroread renders the pages very fast. That's what i want - but it's proprietary:/
    For the moment it's ok but i'd like to have a free alternative to acroread that shows the pages as quick as acroread or preloads more than 1 page.
    lucke wrote:Perhaps, just perhaps it'd work better if you copied it to tmpfs and read from there?
    I've tried it: no improvement.
    Edit: tried Sumatra: an improvement compared to Okular etc. Thanks.
    Last edited by oneway (2009-05-12 21:50:10)

  • Zebra setting for viewer window?

    For some reason I am suddenly getting zebra warnings in my viewer window.
    (little black lines around hot spots in the image)
    I never had this before- not sure why I have them now- but I don't.
    How do I shut this off?

    [Displaying Excess Luma and Chroma Levels in the Viewer and Canvas|http://documentation.apple.com/en/finalcutpro/usermanual/index.html#chap ter=78%26section=5%26tasks=true]

Maybe you are looking for

  • HT204053 Using 2 Apple IDs for the App store on iPad

    Hi there, We're looking to set up and use two Apple Ids, so each can make and control their own app downloads on an iPad Mini. This is our first experience in the ios environment and we're a bit lost with how to handle the Apple ID settings, specific

  • Webservice reference toolkit with office2003 Excel

    Hi, I am trying to use webservice reference toolkit for office 2003 in excel to call a SAP RFC function. The has successfully generated the proxy class. but when i try to execute the webservice method i am getting the following error and Google didnt

  • Do i need to delete my text messages to create more space on phone?

    What is considered "other space" on iphone?  What should i delete so i can back up phone?

  • Macbook pro early 2011 with amd 6750m

    Hi, its a fact that many users have problem with the amd 6750m after some time of use ans Apple replaces the logic board. I tried do discover where is the problem contacting AMD: is it the GPU itself or a soldering? Id like to know whats the problem,

  • Can I disable my old hard drive in filename searches?

    I just installed a new, larger hard drive into my '07 Mac Pro, and then cloned the old hard drive for a seamless transition...now the computer boots and works from the new drive. Everything worked just fine throughout that process...the only issue I