Java Code Examples for javax.swing.event.UndoableEditEvent

Following code examples demonstrate how to use javax.swing.event.UndoableEditEventfrom java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use javax.swing.event.UndoableEditEventand various code implementation of this class.

    @Override
    public void undoableEditHappened( UndoableEditEvent e )
    {
        manager.addEdit( e.getEdit() );
        if( updater != null )
        {
            updater.updateData();
        }
    } 


    @Test
    public default void verifyGenericType()
    throws Exception {
        final Class<SUT> sut = createNewSUT();
        assertTrue("This j8unit test interface is used with a generic type that is illegaly not assignable to UndoableEditEvent.class!",
                   UndoableEditEvent.class.isAssignableFrom(sut));
    } 

	public void undoableEditHappened(UndoableEditEvent arg0) {
		UndoableEdit edit = arg0.getEdit();
		undoManager.addEdit(edit);
	} 

	public void undoableEditHappened(UndoableEditEvent e) {
		adaptee.undoManager.addEdit(e.getEdit());
		updateButtons();
	} 

	public void undoableEditHappened(UndoableEditEvent evt) {
		UndoableEdit edit = evt.getEdit();
		Framework.FW().getUndoManager().addEdit(edit);
		Framework.FW().refreshUndoRedo();
		
		
	} 

Advertisement
Javadoc
An event indicating that an operation which can be undone has occurred.

Warning

: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see java.beans.XMLEncoder. @author Ray Ryan

Read More
Advertisement