[Home] DMelt member access. Java source code: org.jhotdraw.draw.event.FigureSelectionEvent
/*
* @(#)FigureSelectionEvent.java
*
* Copyright (c) 1996-2010 by the original authors of JHotDraw and all its
* contributors. All rights reserved.
*
* You may not use, copy or modify this file, except in compliance with the
* license agreement you entered into with the copyright holders. For details
* see accompanying license terms.
*/
package org.jhotdraw.draw.event;
import org.jhotdraw.draw.*;
import java.util.*;
/**
* An {@code EventObject} sent to {@link FigureSelectionListener}s.
*
*
* Design Patterns
*
*
Observer
* Selection changes of {@code DrawingView} are observed by user interface
* components which act on selected figures.
* Subject: {@link org.jhotdraw.draw.DrawingView}; Observer:
* {@link FigureSelectionListener}; Event: {@link FigureSelectionEvent}.
*
*
* @author Werner Randelshofer
* @version $Id: FigureSelectionEvent.java 717 2010-11-21 12:30:57Z rawcoder $
*/
public class FigureSelectionEvent extends java.util.EventObject {
private Set oldValue;
private Set newValue;
/** Creates a new instance. */
public FigureSelectionEvent(DrawingView source, Set oldValue, Set newValue) {
super(source);
this.oldValue = oldValue;
this.newValue = newValue;
}
public DrawingView getView() {
return (DrawingView) source;
}
public Set getOldSelection() {
return oldValue;
}
public Set getNewSelection() {
return newValue;
}
}