com.jidesoft.swing.event.SidePaneEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jide-oss Show documentation
Show all versions of jide-oss Show documentation
JIDE Common Layer (Professional Swing Components)
/*
* @(#)SidePaneEvent.java
*
* Copyright 2004 JIDE Software Inc. All rights reserved.
*/
package com.jidesoft.swing.event;
import com.jidesoft.swing.SidePaneItem;
import java.awt.*;
/**
* An AWTEvent
that adds support for SidePaneItem
objects as the event source.
*
* @see com.jidesoft.swing.SidePaneItem
* @see SidePaneListener
*/
public class SidePaneEvent extends AWTEvent {
public SidePaneEvent(SidePaneItem source, int id) {
super(source, id);
}
/**
* The first number in the range of IDs used for SidePaneGroup
events.
*/
public static final int SIDE_PANE_FIRST = AWTEvent.RESERVED_ID_MAX + 2100;
/**
* The last number in the range of IDs used for DockableFrame
events.
*/
public static final int SIDE_PANE_LAST = SIDE_PANE_FIRST + 1;
/**
* This event is delivered when a tab in the SidePaneGroup
is selected.
*/
public static final int SIDE_PANE_TAB_SELECTED = SIDE_PANE_FIRST;
/**
* This event is delivered when a tab in the SidePaneGroup
is selected.
*/
public static final int SIDE_PANE_TAB_DESELECTED = 1 + SIDE_PANE_FIRST;
/**
* Returns a parameter string identifying this event. This method is useful for event logging and for debugging.
*
* @return a string identifying the event and its attributes
*/
@Override
public String paramString() {
String typeStr;
switch (id) {
case SIDE_PANE_TAB_SELECTED:
typeStr = "SIDE_PANE_TAB_SELECTED";
break;
case SIDE_PANE_TAB_DESELECTED:
typeStr = "SIDE_PANE_TAB_DESELECTED";
break;
default:
typeStr = "SIDE_PANE_UNKNOWN";
}
return typeStr;
}
/**
* Returns the originator of the event.
*
* @return the SidePaneItem
object that originated the event
*/
public SidePaneItem getSidePaneItem() {
return (source instanceof SidePaneItem) ? (SidePaneItem) source : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy