Weird tracking artifacts while dragging elements in InDesign
For the last two days, I've been getting this weird tracking artifact when dragging an element on top of a semi-transparant background.
I can't seem to figure out how to resolve this. I even de/re-installed InDesign, and then the entire Adobe Suite.
Im running Lion (10.7.2) on a MacBook Pro with a 250 GB SSD and 8 gigs of Ram.
Any help or advice would be greatly appreciated.
Screenshot: http://dl.dropbox.com/u/16762916/Slingshot/Pictures/Screen%20Shot%202012-02-03%20at%209.03 .12%20AM.png
These are user-to-user forums. I think once upon a time the links said that clearly, but it certainly is a bit less obvious now, though the "Learning" page description does say users share their knowledge. No harm done and you are not the only one who comes here thinking they are on a direct line to Adobe. Adobe employees, when they appear, have clearly labeled badges.
I'm really sorry you thought I was taking a tone with you. That was most definitiely not my intention. It's extremely difficult to judge meaning and inflection from a written post, as I'm guessing you must know if you also do support this way. The shortcoming in communication was not a blame situation -- I was trying to let you understand where the breakdown was -- I'm trained to understand some words in particuolar contexts here, and it isn't always correct, and I also apparently misunderstood from the beginning that your screen artifacts didn't get left behind, probably because I'm used to seeing ones that do (mostly in CS3) and I had the scroll bug in mind. These things happen, and we need to let each other know when we aren't communicating, and try to get it right as we move forward.
"Secondly. A brand new macbook pro should be more than capable of running a second display."
OK, this is another case of not quite communicating, I guess. Live Screen Drawing is a LOT more intense video usage than most applications have. It's kind of like trying to watch a movie full screen. That takes a lot more video power than just throwing static images onto two screens. By way of comparison, I have twice the video RAM that's on your system, and probably more processing power, too, and I drive only one monitor, and I STILL don't use Live Screen Drawing because it works so badly. It shouldn't be on by default because practically no computer in the wild can make it run smoothly, but it got set that way because it's a new feature in CS5 and they wanted people to "discover" it. You have no idea how often we have to suggest to users that they turn it off to regain control of their screens.
Similar Messages
-
Bug: scrolling with mouse scroll wheel while dragging tracks no longer works
After upgrading to Spotify for Mac 1.0.2.6, I can no longer use my mouse's scroll wheel while dragging tracks to a different position in a playlist. This is an important feature when working with long playlists. Steps to reproduce:Create a playlist that extends past the bottom of the windowClick and begin dragging the first song on the playlist downwardUse your mouse's scroll wheel to scroll the playlist down. It will not scroll.
Hey ,
Thanks for letting us know.
We don't have any update on this yet and we'll pass the information on to the right team.
We'll keep you posted.
Thanks! -
Audio randomly falling onto weird tracks on the timeline...
Weird question: when I drag certain audio files (music) onto my timeline it splits it onto random tracks. Does not affect the sound, only makes it really annoyingly disorganized, left might be on track1 for example while right will fall onto track 11!! I've tried locking one of the tracks and moving the other but it won't move... I've never seen this before and it must be some random setting that I'm not catching. Anyone had this issue before?
weird.
Did this just start happening?
try unlocking them as a stereo pair under the Modify menu, then unlinking them. Then you should be able to move one next to the other. Then you have to go back and link them as a stereo pair.
Have you rebooted to try to fix it? -
Weird track icon appearing in Logic 9
A weird track icon has appeared in my version of Logic 9. It's on several tracks in a current project and I don't know what it is or how it got there (I can't see it in Logic's chart of track icons anyway, and I've certainly not imported any). If I had a Windows PC I'd suspect a virus or something, but I'm assured by a 'Mac genius' in my local Apple Store that I can't possibly have such a thing.
The icon has two elements which look like characters from some '80s computer game, both orange in colour. One looks like two hard drives stacked one on top of the other; the other is in the shape of a downward-pointing arrowhead or fountain pen nib. The background is black. I'd attach an image if I could see how you do that on this web page!
Can anyone give me information on what's happened here? Thanks very much.It's this icon:
file:///Applications/Logic%20Pro.app/Contents/Resources/Images/LegacyIcons/47.pn g
(paste that into the address bar of your web browser and hit return to open it; it's a local file on your machine, within the Logic bundle)
Logic just assigned one of its legacy icons to the track for whatever reason.
Don't worry about it.
If it bothers you, select another icon and move on. -
Track time and dragging the play location ball
I am running itunes 10.6.1 on osx 10.6.8 and it'd be nice to veiw the track time corresponding to where the play location ball is while. I am dragging the ball and the only way to know the time is to let it go. it'd be nice to have the time update while dragging. is this an option I can turn on or do I need to wait for the apple developers to implement this feature?
Dear Adobe support team,
It's quite an old thread however no update fix for this issue but the workarounds of the good people above. This tiny and yet very irritating bug should has been fixed a long time ago in an update patch. I'm using the latest version of Premiere Pro CS6 (6.0.5) and still look forward for an update fix. I haven't checked whether this issue exists in the CC edition of Premiere Pro, however even if it has been fixed there, I'm not willing to upgrade to it no matter what as I believe in a product I paid the full price for ONCE and that should receive its yearly bug-fix updates, and not for one with an annual fee.
I look forward to hearing from you.
Thanks,
Gal Shemesh -
Error while dragging the table
Hi Folks,
I am getting the following error while dragging the model table on to the diagram tab(creating an interface).
Any Ideas??????
java.lang.NullPointerException
at oracle.odi.interfaces.interactive.support.clauseimporters.ClauseImporterDefault.importClauses(ClauseImporterDefault.java:87)
at oracle.odi.interfaces.interactive.support.actions.InterfaceActionAddSourceDataStore.performAction(InterfaceActionAddSourceDataStore.java:124)
at oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions.performAction(InteractiveInterfaceHelperWithActions.java:845)
at oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions.performAction(InteractiveInterfaceHelperWithActions.java:821)
at oracle.odi.ui.OdiSdkEntityFactory.dropSourceDataStore(OdiSdkEntityFactory.java:523)
at oracle.odi.ui.etlmodeler.diag.dragdrop.DiagramNodeDropHandler.dropObjects(DiagramNodeDropHandler.java:150)
at oracle.diagram.framework.dragdrop.handler.DelegateChooserDropHandler.dropSelected(DelegateChooserDropHandler.java:386)
at oracle.modeler.dnd.ModelerTCDropHandler.access$001(ModelerTCDropHandler.java:69)
at oracle.modeler.dnd.ModelerTCDropHandler$3.run(ModelerTCDropHandler.java:288)
at oracle.modeler.dif.GraphicAdder.addImpl(GraphicAdder.java:387)
at oracle.modeler.dif.GraphicAdder.addAndLayoutImpl(GraphicAdder.java:372)
at oracle.modeler.dif.GraphicAdder.addSelectAndLayout(GraphicAdder.java:348)
at oracle.modeler.dnd.ModelerTCDropHandler.dropSelected(ModelerTCDropHandler.java:284)
at oracle.diagram.framework.dragdrop.handler.DelegateChooserDropHandler.drop(DelegateChooserDropHandler.java:150)
at oracle.diagram.framework.dragdrop.DefaultDropPlugin.drop(DefaultDropPlugin.java:115)
at oracle.modeler.dnd.ModelerDropPlugin.drop(ModelerDropPlugin.java:100)
at oracle.diagram.framework.dragdrop.DropTargetHelper.drop(DropTargetHelper.java:188)
at oracle.diagram.framework.dragdrop.ManagerViewDragAndDropController$MyDropTargetListener.drop(ManagerViewDragAndDropController.java:802)
at java.awt.dnd.DropTarget.drop(DropTarget.java:434)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:519)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:832)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:756)
at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:30)
at java.awt.Component.dispatchEventImpl(Component.java:4508)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4312)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4163)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Thanks in advance
RDid you tryed to refresh your model or delete and re-import it ?
-
'Show JInternalFrame Contents While Dragging'
hi,
I have a question I have an application that has internal frames, Basically it is a MDI Application. I am using JDK 1.2.2 and windows 2000. The question is that when you go to the desktop right click properties and in Effects tab you uncheck the 'Show Window Contents While Dragging' checkBox. Now when I run my application and my parent window that is a frame pops up, if I drag the window i.e. my parent frame it doesn't dragg the contents onlt thw windows border is dragged, means it doesn't repaints that is fine. But when I try to drag one of the internal frame it shows me the contents inside the internalFrame being dragged too and I don't want to see these contents while internal frame is being dragged. So how can I make my application not to show the contents inside the JInternalFrames not to be shown while dragging the JInternalFrame. Any help is really appreciated.
for an example I have added a code example to see the effect that I got from the forums just for an example to show. If you have unchecked the option 'Show Window Contents While Dragging' in Effects tab when you go to the desktop right click properties and the Effects Tab or in the controlPanel dblClick Display and go to Effects tab and uncheck this checkBox. Now run this example and see when you drag the main window contents inside it including JInternalFrame doesn't get dragged just the boundry of the dragging frame is shown. Now if you try to drag the JInternalFrame. Contents inside that are dragged too. And I don't want this behavior. I don't want to see the contents.
/*************** MDITest ************/
import javax.swing.*;
* An application that displays a frame that
* contains internal frames in an MDI type
* interface.
* @author Mike Foley
public class MDITest extends Object {
* Application entry point.
* Create the frame, and display it.
* @param args Command line parameter. Not used.
public static void main( String args[] ) {
try {
UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
} catch( Exception ex ) {
System.err.println( "Exception: " +
ex.getLocalizedMessage() );
JFrame frame = new MDIFrame( "MDI Test" );
frame.pack();
frame.setVisible( true );
} // main
} // MDITest
/*********** MDIFrame.java ************/
import java.awt.*;
import java.awt.event.*;
import java.io.Serializable;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
* A top-level frame. The frame configures itself
* with a JDesktopPane in its content pane.
* @author Mike Foley
public class MDIFrame extends JFrame implements Serializable {
* The desktop pane in our content pane.
private JDesktopPane desktopPane;
* MDIFrame, null constructor.
public MDIFrame() {
this( null );
* MDIFrame, constructor.
* @param title The title for the frame.
public MDIFrame( String title ) {
super( title );
* Customize the frame for our application.
protected void frameInit() {
// Let the super create the panes.
super.frameInit();
JMenuBar menuBar = createMenu();
setJMenuBar( menuBar );
JToolBar toolBar = createToolBar();
Container content = getContentPane();
content.add( toolBar, BorderLayout.NORTH );
desktopPane = new JDesktopPane();
desktopPane.setPreferredSize( new Dimension( 400, 300 ) );
content.add( desktopPane, BorderLayout.CENTER );
} // frameInit
* Create the menu for the frame.
* <p>
* @return The menu for the frame.
protected JMenuBar createMenu() {
JMenuBar menuBar = new JMenuBar();
JMenu file = new JMenu( "File" );
file.setMnemonic( KeyEvent.VK_F );
JMenuItem item;
file.add( new NewInternalFrameAction() );
// file.add( new ExitAction() );
menuBar.add( file );
return( menuBar );
} // createMenuBar
* Create the toolbar for this frame.
* <p>
* @return The newly created toolbar.
protected JToolBar createToolBar() {
final JToolBar toolBar = new JToolBar();
toolBar.setFloatable( false );
toolBar.add( new NewInternalFrameAction() );
// toolBar.add( new ExitAction() );
return( toolBar );
* Create an internal frame.
* A JLabel is added to its content pane for an example
* of content in the internal frame. However, any
* JComponent may be used for content.
* <p>
* @return The newly created internal frame.
public JInternalFrame createInternalFrame() {
JInternalFrame internalFrame =
new JInternalFrame( "Internal JLabel" );
internalFrame.getContentPane().add(
new JLabel( "Internal Frame Content" ) );
internalFrame.setResizable( true );
internalFrame.setClosable( true );
internalFrame.setIconifiable( true );
internalFrame.setMaximizable( true );
internalFrame.pack();
return( internalFrame );
* An Action that creates a new internal frame and
* adds it to this frame's desktop pane.
public class NewInternalFrameAction extends AbstractAction {
* NewInternalFrameAction, constructor.
* Set the name and icon for this action.
public NewInternalFrameAction() {
super( "New", new ImageIcon( "new.gif" ) );
* Perform the action, create an internal frame and
* add it to the desktop pane.
* <p>
* @param e The event causing us to be called.
public void actionPerformed( ActionEvent e ) {
JInternalFrame internalFrame = createInternalFrame();
desktopPane.add( internalFrame,
JLayeredPane.DEFAULT_LAYER );
} // NewInternalFrameAction
} // MDIFrame
I'll really appreciate for any help.
Thank youtry this:
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.putClientProperty("JDesktopPane.dragMode", "outline");Both parameters passed to 'putClientProperty' must be strings.
Hope this helps
Riz -
I have Elements 13 (I have the hard copy) installed on my iMac using Yosemite. I do all my iPhoto work on an external drive where I have copied my iPhoto Library, can I also install Elements 13 on my external harddrive or drag Elements 13 over from my iMac so that I can do work with Elements 13 via the exteranl hard drive? Thanks tb
Yes you can store images on an external hard dive and have them referenced in Organizer. It’s best to export copies to separate folders/subfolders and that will ensure iPhoto does not get corrupted.
Alternatively you could continue to use iPhoto with the Elements Editor set up in the iPhoto prefs as your external editing app. Then there is no need to use Organizer and no need to duplicate your images.
You can then call up photos directly from iPhoto as normal with the additional option e.g.
Double-click on a thumbnail to edit in iPhoto editor.
Control (right) - click on a thumbnail to edit in the elements app.
http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-iphoto-mac-os.html -
How to map the elements in Indesign document with the PDF elements
I wanted to know any way of mapping elements in the InDesign document with the elements in the exported PDF document from the same InDesign document.
E.g If I have an Image X in InDesign document, Can I point out the same element in exported PDF using some mapping?
Thanks in advance
-SandeepWhat is meant by me is, if there is a Text element in InDesign document, I should able to point out the respective PDF object.
I am looking for some way to mark a specific InDesign element and once we export the document to PDF, I want to point out to the same element in some way so that I can process it.
Requirement is simple, one user will mark some elements in the InDesign document and export it to PDF and send it to the other user. Other user will parse the PDF and extract the same element back or process it and use it. -
How to show MouseOver effect on dropable region while dragging a MovieClip?
Hello friends,
I am creating Drag and drop flash application.
While dragging an instance of a movieclip I want also the dropable region to show effect like MouseOver case.
So that end user can confirm that they are dropping the item in right region.
Here the mouse is moved while it is kept clicked
Plz help me,
Thanks.
VenkatThanks for taking interest.
I did the first part of your reply already, but How to check if a MovieClip is being dragged?
Say, I have two MovieClips
TargetToDrop_mc
DropableRegion_mc
TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_DOWN, gotMouseDown);
TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_UP, gotMouseUp);
TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_OVER, gotMouseOver);
TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_OUT, gotMouseOut);
DropableRegion_mc.addEventListener(MouseEvent.MOUSE_DOWN, gotMouseDown);
DropableRegion_mc.addEventListener(MouseEvent.MOUSE_UP, gotMouseUp);
DropableRegion_mc.addEventListener(MouseEvent.MOUSE_OVER, gotMouseOver);
DropableRegion_mc.addEventListener(MouseEvent.MOUSE_OUT, gotMouseOut);
function gotMouseDown(EventReceived:MouseEvent):void {
EventReceived.currentTarget.startDrag ();
function gotMouseUp(EventReceived:MouseEvent):void{
EventReceived.currentTarget.stopDrag();
function gotMouseOver(EventReceived:MouseEvent):void{
EventReceived.currentTarget.alpha=0.5;
function gotMouseOut(EventReceived:MouseEvent):void{
EventReceived.currentTarget.alpha=0.7;
Now plze guide me on basis of above.
Thanks,
Venkat -
How to get the filepath while dragging
Hi all ,
I am performing a file copying application I wanted to know how to get the path of the particular file while dragging. (i.e if I perform something like a mousedown or mouseover event I should be able to get the complete path of the filename.
Reply,
KalpeshYou can drag the file name into the application, or use something like PathSnagger
G4 Digital Audio 1.4GHz Mac OS X (10.4.9) -
High CPU consumption with repaint while dragging
Hi! I certainly hope someone can help me with this. I am building a graphical user interface for a graph with custom nodes and edges, the nodes being draggable. I have tried making each network component (node or edge) a JComponent. Now, I'm trying using only one JPanel to paint all the components. Either way, I find that dragging takes up too much CPU % especially when using full screen graphics, usually around 92%. And that is on a machine with >1.9GHz.
It does not really make much of a difference when I paint outlines of the components while dragging. Any ideas about this? Thanks.
My runnable test code is rather long so I've uploaded it to : http://web.mit.edu/jabos/www/SyncTest/GUILoad2.java.
-BosunComments about changes to your code:
1 - trouble in rendering with setOpaque(false). Set this to true and add super.paintComponent(g) in paintComponent to take care of background paint updates
2 - had to doctor your ConnComp class; the constructor was under construction...
3 - I'm using j2se 1.4 so I converted your:
ArrayList generics to the old Object casts and
the JFrame setPreferredSize to setSize
This runs okay now. The highest cpu usage numbers I saw were 52% in full screen and 37% in regular mode (2.6 GHz).
The painting part seems okay; I think the trouble is in excessive data storage and manipulation. I would re–design your program to eliminate all the type checking with the instanceof operator. Specifically I would try to use only one ArrayList for the node objects and draw the connection lines between them inside paintComponent depending on how a boolean is set, eg if(showLines). As an aside, GradientPaint is for fill operations and will not benefit your line display.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.ArrayList;
* This demo paints all network components in a single JComponent
* @author jabos
public class DragTest extends JPanel {
* all components
public ArrayList comps;
public ArrayList compsDragged; // actually only RectComps
* arraylist of all connection components
public ArrayList conncomps;
public boolean dragging = false, repaintWhileDragging = true;
Point2D initp = null;
public JLabel repaintDrag;
public DragTest() {
repaintDrag = new JLabel("repaintWhileDragging : " + repaintWhileDragging);
repaintDrag.setForeground(Color.MAGENTA);
add(repaintDrag);
add(new JLabel("Press \"R\" to change repaint protocols during dragging"));
comps = new ArrayList();
compsDragged = new ArrayList();
conncomps = new ArrayList();
addMouseMotionListener(new MouseMotionAdapter() {
public void mouseDragged(MouseEvent e) {
//* // Remove initial slash to disable repainting while dragging
if (repaintWhileDragging) {
Point2D pp = e.getPoint();
AffineTransform t = AffineTransform.getTranslateInstance(
pp.getX() - initp.getX(),
pp.getY() - initp.getY());
initp = pp; // reset initp
for (int j = 0; j < compsDragged.size(); j++) {
Comp comp = (Comp)compsDragged.get(j);
if (comp instanceof RectComp)
comp.updateCompLocation(t);
// and again to update ConnComps
for (int j = 0; j < conncomps.size(); j++) {
Comp comp = (Comp)conncomps.get(j);
if (comp instanceof ConnComp)
comp.updateCompLocation(t);
dragging = true;
repaint();
dragging = true;
addMouseListener(new MouseAdapter() {
// does final repaint if dragging just finished
public void mouseReleased(MouseEvent e) {
if (dragging) {
Point2D pp = e.getPoint();
AffineTransform t = AffineTransform.getTranslateInstance(
pp.getX() - initp.getX(),
pp.getY() - initp.getY());
for (int j = 0; j < compsDragged.size(); j++) {
Comp comp = (Comp)compsDragged.get(j);
if (comp instanceof RectComp)
comp.updateCompLocation(t);
// and again to update ConnComps
for (int j = 0; j < conncomps.size(); j++) {
Comp comp = (Comp)conncomps.get(j);
if (comp instanceof ConnComp)
comp.updateCompLocation(t);
repaint();
dragging = false;
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
// Updates list of components being dragged
public void mousePressed(MouseEvent e) {
compsDragged.clear();
initp = e.getPoint();
for (int j = 0; j < comps.size(); j++) {
Comp comp = (Comp)comps.get(j);
if (comp.graphic.contains(initp))
compsDragged.add(comp);
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
if(e.getKeyCode() == KeyEvent.VK_R) {
repaintWhileDragging = !repaintWhileDragging;
repaintDrag.setText("repaintWhileDragging : " +
repaintWhileDragging);
// setOpaque(false);
setFocusable(true);
requestFocusInWindow();
public static void main(String[] args) {
GraphicsDevice device =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
JFrame f = new JFrame("GUILOAD2", device.getDefaultConfiguration());
//* // remove initial slash to disable full screen
device.setFullScreenWindow(SwingUtilities.getWindowAncestor(f));
//needs to be set AFTER fullscreenmode so that the toolbar is NOT draggable!
f.setExtendedState(JFrame.MAXIMIZED_BOTH);
// enable use of Look and Feel
f.setUndecorated(true); // Set false, EE is still minimizable
f.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
f.setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().
getMaximumWindowBounds());
DragTest p = new DragTest();
p.setBackground(Color.WHITE);
RectComp[] rc = new RectComp[100];
int n = -1, x = 30, y = 30, b = 100, inc = 40;
// add REctComps
for (int i = 0; i < 10; i++) {
p.add(rc[++n] = new RectComp(new Point2D.Double(x += inc, y += inc),
new Color(x % 255, y % 255, (b += 10) % 255)));
x = 34; y = 32; b = 32;
// add ConnComps
while (n > 0) {
p.add(new ConnComp(rc[n--], rc[n],
new Color((x += inc) % 255, (y += inc) % 255,
(b += inc) % 255),
new Color((x += inc) % 255, (y += inc) % 255,
(b += inc) % 255)));
f.setContentPane(p);
f.setSize(700, 700);
makeFramex(f, false);
/* // remove initial slash to disable full screen; Also, uncomment above
f.setResizable(false);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setIgnoreRepaint(true);
f.setVisible(true);
public static void makeFramex(JFrame frame, boolean resizable) {
frame.setSize(frame.getSize());
// frame.setResizable(resizable);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// frame.pack();
frame.setVisible(true);
* Adds network component c to this simulation
* @param c
public void add(Comp c) {
comps.add(c);
if (c instanceof ConnComp) {
conncomps.add((ConnComp)c);
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2D = (Graphics2D) g;
g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
for (int j = 0; j < comps.size(); j++) {
Comp comp = (Comp)comps.get(j);
//for (Comp i : dragging ? compsDragged : comps) {
try {
g2D.setPaint(comp.color);
if (comp instanceof ConnComp) {
g2D.setStroke(((ConnComp) comp).compStroke);
g2D.draw(comp.graphic);
if (comp instanceof RectComp)
g2D.fill(comp.graphic);
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement
// use File | Settings | File Templates.
* A network component that simulates a node
private static class RectComp extends Comp {
RectComp(Point2D centero, Paint c) {
super(c);
center = centero;
graphic = new Ellipse2D.Double(center.getX() - radius,
center.getY() - radius, radius * 2 - 2, radius * 2 - 2);
public void updateCompLocation(AffineTransform t) {
graphic = t.createTransformedShape(graphic);
Rectangle2D r = graphic.getBounds2D();
center = new Point2D.Double(r.getCenterX(), r.getCenterY());
//System.out.println("newCenterX=" + r.getCenterX());
* A network component that simulates a connection between two nodes
private static class ConnComp extends Comp {
Stroke compStroke;
RectComp origin, destination;
Paint color;
ConnComp(RectComp origino, RectComp desto, Color c1, Color c2) {
super(c1);
if (c2 != null)
color = new GradientPaint(origino.center, c1, desto.center, c2);
else
color = c1;
graphic = new Line2D.Double(origino.center, desto.center);
this.origin = origino;
this.destination = desto;
compStroke = new BasicStroke(3);
// updateCompLocation(new AffineTransform());
public void updateCompLocation(AffineTransform t) {
((Line2D)graphic).setLine(origin.center, destination.center);
if(color instanceof GradientPaint)
color = new GradientPaint(((Line2D)graphic).getP1(),
((GradientPaint)color).getColor1(),
((Line2D)graphic).getP2(),
((GradientPaint)color).getColor2());
//System.out.println("newLineX:" + ((Line2D) graphic).getX1() +
// "---" + ((Line2D) graphic).getX2());
* demo Superclass for all network components
private abstract static class Comp {
Point2D center;
Shape graphic;
int radius = 20;
Paint color;
Comp(Paint c) {
color = c;
* Updates internal parameters of Comp necessary for correct repaint
* @param t
public abstract void updateCompLocation(AffineTransform t);
} -
Why i am unable to select between 2 anchor points with in a object while dragging with direct select
why i am unable to select between 2 anchor points with in a object while dragging with direct selection tool instead it moves
Another option is to temporarily change your view to outline mode, when your done switch back to preview mode. Ctrl-Y or View>Outline {View>Preview} The menu option will change depending on which mode you are in.
And another option, double click on the object in question to place it in Isolation mode. You can now edit to your hearts content. When done, click on the gray border at top of document.
So as you can see there are multiple ways of accomplishing the same thing. -
Executing Java script while dragging a component
Hi,
Is there a way to execute Java script while dragging a component, I have noticed only following events mouseMove, mouseOut, mouseDown mouseUp for clientListener tag. could not find anything related to dragging event.
My scenario is, I have componentDragSource to a component and I want fire a java script event on drag of that component.
Please suggest. TIA.
Thanks,
Siva G.Hi Frank,
Thanks for your response.
Could you please give me some sample on that like what type of event and on which component I have to set clientListener.
Thanks,
Siva G. -
Lightroom crashed while dragging a photo in Book module
I was creating a book in Lightroom 5. While dragging a photo within the book Lightroom quit. An error window popped up and I sent the message per instruction. The message that came back stated Lightroom could not repair the problem. The screen is now blank and showing "Loading" for the past 9 hours.
Dorin, you are a Lightroom 4 God! Because I wasn't thinking of the text as a "caption" but rather as text, I never saw that option. I just tried it and it is fine. I am not sure if I can play with the dimensions of the box as much as I like, but I could deal with that by how I arrange the type. Yeah you!
While I'm typing to you, I have another question: one of the neat things about the book module is that you can switch into Develop and make a change in the photo and it automatically updates the photo in the book module. HOWEVER -- what happens if at some time in the future I am working with a photo which is in a book -- and I like the way it is for that book -- and I want to change the photo for another use. Will that change in the photo change the photo in the book? If so, is there any way to keep this from happening? I could see using a photo in a book in black & white, but wanting to use in for a graphic in color. I'd hate to come back to my book and see that all my work there had been screwed up.
Thanks,
P
Maybe you are looking for
-
Hi All.. Can you plz explain me clearly.. How can i use WRITE_FOR .. shell i write it in form or Print Program.. Clearly.. i want to print 5 columns like vbap-arktx, vbap-zmeng,vbap-zmeng,vbap-netpr, vbap-kzwi1.. with headings Service details,personn
-
Some of my songs in iPad Mini with RD disappeared all the sudden and I need to redownload it again. Same thing happen to my iPod touch 5 too. What's wrong with it? Is it the iOS problem?
-
Is it possible to display the size of a folder in a cell??
Hi, i would like to know if there is any way or function to assign to a cell for display for example the size of a folder on the hard drive..... so whenever the folder size is changing, the cell is updated...... another example, is to display the num
-
I want to develop Reporting tool using java.I shld use Datawarehousing concepts in that tool. Can any one give some idea for this problem.
-
Extra songs synchronized to iPod randomly
For some reason, when I sync my ipod 5.5G using iTunes 7.4.2 on Mac OS, randomly about an extra 300 songs are sync'd besides the actual new material in my library. This doesn't happen every time, but it's quite frequent. I thought this might have to